Skip to content

Reactions not working after restart #122

Answered by danirod
BulletSpongeTM asked this question in Q&A
Discussion options

You must be logged in to vote

This is one of the surprises that I got while updating the bot. I have a staging server to test my bot. I always run one of the examples, react to a message, check if I get the role, unreact to the message, check if it removes the role.

First test I do after updating to Discord.js 14, this exact issue happening. It turns out that Discord.js is now more strict with data that is not in the bot cache, and it will not deliver events for messages that existed before the bot restarts unless you subscribe to the partials.

Check if you have the partials for Message and Reaction set when creating the discordjs Client. Something like:

const bot = new Client({
  partials: ["MESSAGES", "REACTION"],
  

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BulletSpongeTM
Comment options

Answer selected by BulletSpongeTM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants