Browse Source

Declare emojiID and numEmoji after emoji

master
Abheek Dhawan 4 years ago
parent
commit
435bbc7bf0
  1. 2
      bot.js

2
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())

Loading…
Cancel
Save