I have just started creating a discord bot using discord.js and was trying out the events and came across an issue. The messageDeleted
event doesn't trigger when a message gets deleted.
const discord = require('discord.js');
const Client = new discord.Client();
const token = 'bot_token';
Client.on('ready', function(){console.log('Logged on!')});
Client.on('messageDeleted', function(message, channel){
console.log('Test, a message was deleted.');
});
Client.login(token);
It never prints out 'Test, a message was deleted.' when I delete a message. note I've tried deleting messages already in chat before running the code and deleting messages I created after running the code to see if that was the issue. Still nothing.
via CyberLX
No comments:
Post a Comment