Browse Source

Use messageReaction.count instead of messageReaction.emoji.count

master
Abheek Dhawan 4 years ago
parent
commit
ac87b26051
  1. 4
      index.js

4
index.js

@ -355,13 +355,13 @@ client.on('channelCreate', channel => {
client.on('messageReactionAdd', (messageReaction, user) => { client.on('messageReactionAdd', (messageReaction, user) => {
const userTag = user.tag; const userTag = user.tag;
const emoji = messageReaction.emoji.name; const emoji = messageReaction.emoji.name;
const numEmoji = messageReaction.emoji.count; const numEmoji = messageReaction.count;
const messageContent = messageReaction.message.content; const messageContent = messageReaction.message.content;
let channelCategory; let channelCategory;
const channelCreateEmbed = new Discord.MessageEmbed() const channelCreateEmbed = new Discord.MessageEmbed()
.setTitle("Reaction Added") .setTitle("Reaction Added")
.addField("Message", messageContent) .addField("Message", messageContent)
.addField("Reactions", `${userTag} reacted with ${emoji}, along with ${numEmoji - 1} other people in ${messageReaction.message.channel.name}.`) .addField("Reactions", `${userTag} reacted with ${emoji}, along with ${numEmoji - 1} other people in #${messageReaction.message.channel.name}.`)
.setFooter("Emoji ID: " + messageReaction.emoji.id) .setFooter("Emoji ID: " + messageReaction.emoji.id)
.setTimestamp() .setTimestamp()
.setColor('00aaff'); .setColor('00aaff');

Loading…
Cancel
Save