1
votes

I've written a discord.js bot and use a message's reactions to update my database on add or remove of a reaction.

I have everything working just fine by fetching the messages on client start and use messageReactionAdd and messageReactionRemove.

The issue is that by fetching the old message apparently I'm not fetching the message's old reactions so when a user removes the reaction right after the client's restart, nothing happens. If the user adds a reaction while the client is running and then remove it messageReactionRemove is working just fine.

How can I cache also the reactions of the fetched message so the messageReactionRemove gonna listen to the removal of an old reaction right after a restart?

1

1 Answers

1
votes

The problem is explained better here.

The solution is either to use partials or to catch raw events, explanation for raw events by AnIdiotsGuide, here.