From 0de43c1d86889b25ecc5be227851ff5fbde7468d Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 4 Apr 2021 23:24:08 -0500 Subject: [PATCH] Use emoji id to account for custom emojis --- bot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.js b/bot.js index fe13745..4a91065 100644 --- a/bot.js +++ b/bot.js @@ -798,7 +798,8 @@ client.on('messageReactionAdd', (messageReaction, user) => { messageReaction.message.channel.messages.fetch(messageReaction.message.id) .then(message => { const emoji = messageReaction.emoji.name; - const numEmoji = message.reactions.cache.get(emoji).count; + const emojiID = messageReaction.emoji.id; + const numEmoji = message.reactions.cache.get(emojiID).count; const messageReactionAddEmbed = new Discord.MessageEmbed() .setTitle("Reaction Added") .setAuthor(message.author.tag, message.author.avatarURL())