From 435bbc7bf0f8d06ac187b7d313d12eeeacda77c3 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Mon, 5 Apr 2021 09:08:25 -0500 Subject: [PATCH] Declare emojiID and numEmoji after emoji --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index f9cdb89..6550113 100644 --- a/bot.js +++ b/bot.js @@ -880,10 +880,10 @@ client.on('messageReactionAdd', (messageReaction, user) => { client.on('messageReactionRemove', (messageReaction, user) => { messageReaction.message.channel.messages.fetch(messageReaction.message.id) .then(message => { + const emoji = messageReaction.emoji.name; const emojiID = messageReaction.emoji.id; let numEmoji; message.reactions.cache.get(emojiID) ? numEmoji = message.reactions.cache.get(emojiID).count : numEmoji = message.reactions.cache.get(emoji).count; - const emoji = messageReaction.emoji.name; const messageReactionRemoveEmbed = new Discord.MessageEmbed() .setTitle("Reaction Removed") .setAuthor(user.tag, user.avatarURL())