Fixed start PM

This commit is contained in:
hydrabolt
2015-10-31 23:46:46 +00:00
parent 6d6dcf533a
commit 3c16a9f2a4
8 changed files with 35 additions and 71 deletions

View File

@@ -10,24 +10,11 @@ a.on("debug", function (m) {
});
a.on("message", function (m) {
if (m.content === "$$$") a.reply(m, "hi man!").then(function (m) {
a.updateMessage(m, "!!!").then(function (m) {
a.updateMessage(m, "the old content was " + m.content);
});
if (m.content === "$$$") a.sendMessage(m.author, "hi!")["catch"](function (e) {
return console.log(e);
});
});
a.on("messageUpdated", function(newm, oldm){
if(oldm){
a.sendMessage(oldm, `woah! ${newm.author} changed their message! how rude`)
}
})
a.on("messageDeleted", function(oldm){
if(oldm){
a.sendMessage(oldm, `woah! ${oldm.author} deleted their message! how rude`)
}
})
a.login(process.env["discordEmail"], process.env["discordPass"])["catch"](function (e) {
return console.log(e);
});