From 5e5b820e485d456d2618275d41dd564032842112 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Mon, 5 Apr 2021 00:16:17 -0500 Subject: [PATCH] Make sure to assign variable in conditional statement --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 047480e..811b62e 100644 --- a/bot.js +++ b/bot.js @@ -800,7 +800,7 @@ client.on('messageReactionAdd', (messageReaction, user) => { const emoji = messageReaction.emoji.name; const emojiID = messageReaction.emoji.id; let numEmoji; - message.reactions.cache.get(emojiID) ? numEmoji = message.reactions.cache.get(emojiID).count : message.reactions.cache.get(emoji).count; + message.reactions.cache.get(emojiID) ? numEmoji = message.reactions.cache.get(emojiID).count : numEmoji = message.reactions.cache.get(emoji).count; const messageReactionAddEmbed = new Discord.MessageEmbed() .setTitle("Reaction Added") .setAuthor(message.author.tag, message.author.avatarURL())