Added status setting

You can now run bot.setStatusIdle() or bot.setStatusOnline() (or any
aliases) to manually set the status of the bot.
This commit is contained in:
hydrabolt
2015-09-26 21:59:27 +01:00
parent 7f5050f979
commit 3094c223ec
3 changed files with 55 additions and 6 deletions

View File

@@ -18,12 +18,14 @@ mybot.on("message", function (message) {
// we can go ahead :)
var onlineUsers = 0;
for(user of message.channel.users){
if(user.status === "online" || user.status === "idle")
onlineUsers++;
}
mybot.setStatusIdle();
mybot.reply(message, onlineUsers);
setTimeout(function(){
mybot.setStatusOnline();
},5000);
});
mybot.on("ready", function () {