Detect reactions
Hi, I'm trying to simply detect when any reaction has been added to any message. How can I do that?
My end goal is to then check if it's in a certain channel before I store it temporarily, so if there's another way to do that that's also fine.
I've tried using this code on Collectors just to get started understanding them from https://discordjs.guide/popular-topics/collectors.html#message-collectors but it seems like it needs to be in a command, which i'm not sure where in a command it would be since commands have a short life span and this is a more long (2 day) active thing.
Any help appreciated! 🙂
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
2 Replies
- 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!
- ✅
Marked as resolved by OPfor reference I'm doing the same thing here, but this is to check for new messages instead of checking for new reactions:
I was hoping I could use
client.on("messageReactionAdd" )
but apparently that only works with "cached" messages so if anyone also knows how to do that that'd be nice as I feel more confident with using client.on()