Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why bot doesn't fire messageReactionAdd event when the message was sent before the bot was online

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You need partials:

const client = new Client({
    intents: ‘’, // your intents here
    partials: ['CHANNEL', 'GUILD_MEMBER', 'GUILD_SCHEDULED_EVENT', 'MESSAGE', 'REACTION', 'USER'],
});
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading