#Reaction Does Something

9 messages · Page 1 of 1 (latest)

shadow wave
#

Having trouble finding out how to know when a user reacts to a specific message and then just output to the console something like [userid] has reacted to the message with [reaction?]

tawdry moon
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

quiet sunBOT
#

Documentation suggestion for @shadow wave:
event (event) Client#messageReactionAdd
Emitted whenever a reaction is added to a cached message.

shadow wave
#

noticed that the description of that event says that the message needs to be cached so i found this answer on stack overflow https://stackoverflow.com/questions/61694750/cache-message-discord-js and then have this bit of code but not getting any output

client.on('messageReactionAdd', (reaction, user) => {
  console.log(reaction);
  console.log(user);
});
#

and from what i found from my few mins of searching messages get cached went sent when the bot is online, so i sent a new message and added a reaction and did not get an output from that either

gentle salmon
#

You can also use partials to receive the event on uncached messages.
Keep in mind that you need the Guilds, GuildMessages and GuildMessageReactions intent.

quiet sunBOT
shadow wave
#

oh i just forgot to put the intent in 🤦

#

thank you tho 👍