This is my event to check user add react:
const client = require("../index");
client.on('messageReactionAdd', async (reaction, user) => {
if (user.bot) return;
console.log(reaction.emoji.name);
});
It’s working, but when the bot restarts, it can’t fetch any message sent before?
Why and how to fix it?
>Solution :
You need partials:
const client = new Client({
intents: ‘’, // your intents here
partials: ['CHANNEL', 'GUILD_MEMBER', 'GUILD_SCHEDULED_EVENT', 'MESSAGE', 'REACTION', 'USER'],
});