Browse Source

Use emoji id to account for custom emojis

master
Abheek Dhawan 4 years ago
parent
commit
0de43c1d86
  1. 3
      bot.js

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

Loading…
Cancel
Save