Collection Reaction not working.

I've been messing with this for hours and searching all the same stuff It's just not working for my so no idea what I'm doing wrong
No description
No description
24 Replies
d.js toolkit
d.js toolkit10mo ago
- 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 OP
Ashish
Ashish10mo ago
What exactly do you want It seems like your filter is only saying to collect the reactions from your bot
Z0G0N
Z0G0NOP10mo ago
I want to get an the users who reacted that's the newer one
Ashish
Ashish10mo ago
then compare it with interaction.user.id message.author.id returns your bot id
Z0G0N
Z0G0NOP10mo ago
it probably is but I've tried many different ways I was using interaction.user.id before that
Ashish
Ashish10mo ago
You did
const message = interaction.reply({ ... })
const message = interaction.reply({ ... })
That means message is what your bot sent, not by the user
Z0G0N
Z0G0NOP10mo ago
I want to get all users who reacted to the message I know
Ashish
Ashish10mo ago
Then remove the condition
Z0G0N
Z0G0NOP10mo ago
wym
Ashish
Ashish10mo ago
You only need the reaction.emoji.name condition Your code for the filter is:
return reaction.emoji.name === "..." && user.id === message.author.id
return reaction.emoji.name === "..." && user.id === message.author.id
If you want all users, just remove the condition where you compare the user ids That way everyone who reacted with the airplane emoji will be in the collector Right now it only filters it to 1 person
Z0G0N
Z0G0NOP10mo ago
No description
Z0G0N
Z0G0NOP10mo ago
so like this
Ashish
Ashish10mo ago
Yup
Z0G0N
Z0G0NOP10mo ago
I've done this
Ashish
Ashish10mo ago
Oh I forgot you also need
d.js docs
d.js docs10mo ago
:guide: Popular Topics: Partial Structures read more
Ashish
Ashish10mo ago
Specifically the reaction partial
Z0G0N
Z0G0NOP10mo ago
oh
Z0G0N
Z0G0NOP10mo ago
No description
Z0G0N
Z0G0NOP10mo ago
No description
Ashish
Ashish10mo ago
My bad, I forgot one more thing You need the GuildMessages intent as well
Z0G0N
Z0G0NOP10mo ago
No description
Z0G0N
Z0G0NOP10mo ago
so the only thing I did not do was Partials that' was the 1 thing I was missing for the past 6 to 7 hours fun Thanks for the help.
Ashish
Ashish10mo ago
No problem!
Want results from more Discord servers?
Add your server