mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Added message deletion
This commit is contained in:
12
test/bot.js
12
test/bot.js
@@ -8,4 +8,14 @@ mybot.login(Auth.email, Auth.password, function(err, res){
|
||||
|
||||
mybot.on("ready", function(){
|
||||
console.log("Ready!");
|
||||
})
|
||||
})
|
||||
|
||||
mybot.on("message", function(msg){
|
||||
console.log("Another message by "+msg.author.username+"... now I have "+mybot.messages.length);
|
||||
})
|
||||
|
||||
mybot.on("messageDelete", function(channel, message){
|
||||
|
||||
console.log("MESSAGE WAS DELETED BY " + ( message ? message.author.username : channel.name ));
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user