I'm setting up a ReactionCollector on a message like this:
const filter = (reaction, user) => {
return true;
};
const collector = msg.createReactionCollector(filter);
collector.on('collect', (reaction, user) => {
console.log('Callback - User:' + user.id)
});
I would expect that this would print Callback - User: foo when a user with the UserID foo reacts to msg.
However, this only happens if the User has already sent a message in the Channel after msg was sent.
Caused by API intents - #4961.
Thanks for the reply. It's not obvious to me which of my functions requires those privileges. Could you elaborate?
I also have the same issue. I don't see how that's related to privileges though . . .
You don't need privileged intents for that, you just need to enable necessary partials in ClientOptions.
I see, so I would imagine that in this particular scenario, the "REACTION" string needs to be added to the array in the partials attribute of the Client. Thanks a lot!
It would be good if you could also add a warning about this on the documentation of classes like ReactionCollector (https://discordjs.guide/popular-topics/collectors.html#reaction-collectors).
"You don't need privileged intents for that, you just need to enable necessary partials in ClientOptions."
Hi can someone tell me how I do this
"You don't need privileged intents for that, you just need to enable necessary partials in ClientOptions."
Hi can someone tell me how I do this
See the link provided by advaith above (https://discord.js.org/#/docs/main/stable/topics/partials)
Most helpful comment
You don't need privileged intents for that, you just need to enable necessary partials in ClientOptions.