mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
Fixed start PM
This commit is contained in:
17
lib/index.js
17
lib/index.js
@@ -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);
|
||||
});
|
||||
Reference in New Issue
Block a user