messageDelete event doesn't trigger when I delete a message that was sent before the bot went online.
e.g. if you run the bot then send a message and delete it the event will work normally but if you send the message before running the bot then the event won't work
I use a normal code to test it
const { Client, Intents } = require('discord.js');
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES
]
});
client.on('messageDelete', message => {
console.log(message.content);
});