I need to send a private message to everyone, as i can't find a documentation about it, i saw a similar script by raphraph. What is wrong with this snippet, is this a bug of lastest sinusbot beta? (i think in old version worked).
When i run it, sinus says "Can't chatPrivate of undefined" or similar thing (i don't remember that atm)
When i run it, sinus says "Can't chatPrivate of undefined" or similar thing (i don't remember that atm)
Code:
var clients = getClients();
for (var j = 0; j < clients.length; j++) {
var client = clients[j];
chatPrivate(client.id, "hello");
}
function getClients() {
var channel, channels, clients = [];
channels = getChannels();
for(var i = 0; i < channels.length; i++){
channel = channels[i];
clients.push(channel.clients);
}
return clients;
};