Updating documentation for receiving partial messageReactionRemove event
I spent a good deal of time trying to figure out why I was receiving partial events for adding reactions to uncached messages, but not receiving events for removal.
Example:
Start the bot, then react to a message. The
messageReactionAdd
event is triggered and a partial reaction object is received, along with a non-partial user object.
vs.
React to a message, then start the bot. Removing the reaction then does not trigger the messageReactionRemove
event.
This can be reproduced using the guide code for receiving partials and following the steps above.
I found the solution in this issue page, but I disagree with the final post in the thread suggesting it's common sense that Partials.User
is needed to detect removals, because:
- messageReactionAdd
is emitted perfectly fine without it
- The guide page about recieving reactions on uncached messages seems to imply you only need Message, Channel, and Reaction partials to receive both reaction events
- The code from the 'guide' repo linked above includes a section to handle messageReactionRemove
, but does not contain any references to Partials.User
I'm deeply sorry if this is the wrong place or way to go about asking this, but is there a reason this quirk is not mentioned in the docs or in the example code?
Thanks in advance1 Reply
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!