Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
101
rated 0 times [  102] [ 1]  / answers: 1 / hits: 24516  / 6 Years ago, wed, october 31, 2018, 12:00:00

I'am trying to code a discord bot with node.js, but i have a problem with messageReactionAdd I don't now why the bot does nothing when i react with an emoji.


My code :


bot.on('messageReactionRemove', (reaction, user) => {
console.log("that work 1");
if(reaction.emoji.name === "white_check_mark") {
console.log("that work 2");
}})

More From » discord.js

 Answers
8

Events messageReactionAdd and messageReactionRemove working only for cached messages. You need add raw event to your code for trigger any message.
https://github.com/AnIdiotsGuide/discordjs-bot-guide/blob/master/coding-guides/raw-events.md


[#53195] Monday, October 29, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
luna

Total Points: 698
Total Questions: 114
Total Answers: 93

Location: Israel
Member since Wed, Apr 14, 2021
3 Years ago
luna questions
;