Added username changing

This commit is contained in:
hydrabolt
2015-08-25 17:32:49 +01:00
parent 8eb1afa371
commit ab424ce4a4
3 changed files with 119 additions and 2 deletions

View File

@@ -18,8 +18,11 @@ mybot.on("message", function (msg) {
if(msg.content === "pmme"){
console.log("yes we found it!");
mybot.setUsername("hydrabot").catch(function(err){
console.log(err);
});
mybot.reply(msg, "You know what "+msg.sender+"? NO").then(function(msg){
mybot.deleteMessage(msg, 5000);
mybot.updateMessage(msg, "wat");
});
}