From the Scaledrone link above. You need to modify this to work with whatever setup you have. Did you write the code for the chat site?
// Subscribe after the 'open' or 'authenticate' event from the Scaledrone instance
const room = drone.subscribe('room_name');
room.on('message', message => {
// Received message from room
const {data, id, timestamp, clientId, member} = message;
if (member.id === myId && message ==='expelliarmus') {
location.reload()
}
});
Problem :
I own a website where it is a chatroom that most of my school uses to talk. There are some annoying spammers and just recently I made a way to ban them but they have to refresh. Is there any way I can make a way to refresh everyones screen who is on my website and have the spammer banned? It would also be useful to use this and refresh everyone when I release an update.
Is there a way to do this using Scaledrone, which is the library that I am using?
Comments
Comment posted by CertainPerformance
Probably, but given that there’s no code at all in the question, it’ll be pretty impossible to say what you need to change to achieve it
Comment posted by Dumb Coder
What code would i put in there? like some source code because i have some password and stuff that i dont want to be out there
Comment posted by ceejayoz
Well, you’ve figured out how to push new chat items to their screens, right? Same idea, except instead of displaying a new chat text, you do something else with the info.
Comment posted by ceejayoz
@DumbCoder Not the whole thing. Details and
Comment posted by Dumb Coder
I used scaledrone
Comment posted by Dumb Coder
how do i like call the location.reload() do i make a button that only i woud have or smth and then call it that way????
Comment posted by Dumb Coder
I just need it to refresh their screen i dont need a ban system or anything i just need it to refresh so that the code could update and it could notice that their banned