Browse Source

Use emoji instead of emoji.name to display emojis instead of their names

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

4
bot.js

@ -805,7 +805,7 @@ client.on('messageReactionAdd', (messageReaction, user) => {
.setTitle("Reaction Added") .setTitle("Reaction Added")
.setAuthor(message.author.tag, message.author.avatarURL()) .setAuthor(message.author.tag, message.author.avatarURL())
.addField("Link", `[Click here!](${message.url})`) .addField("Link", `[Click here!](${message.url})`)
.addField("Reactions", `\`${user.tag}\` reacted with \`${emoji}\`, along with ${numEmoji - 1} other people in ${messageReaction.message.channel}.`) .addField("Reactions", `\`${user.tag}\` reacted with ${messageReaction.emoji}, along with ${numEmoji - 1} other people in ${messageReaction.message.channel}.`)
.setFooter("Message ID: " + messageReaction.message.id) .setFooter("Message ID: " + messageReaction.message.id)
.setThumbnail(message.author.avatarURL()) .setThumbnail(message.author.avatarURL())
.setTimestamp() .setTimestamp()
@ -884,7 +884,7 @@ client.on('messageReactionRemove', (messageReaction, user) => {
const messageReactionRemoveEmbed = new Discord.MessageEmbed() const messageReactionRemoveEmbed = new Discord.MessageEmbed()
.setTitle("Reaction Removed") .setTitle("Reaction Removed")
.addField("Link", `[Click here!](${message.url})`) .addField("Link", `[Click here!](${message.url})`)
.addField("Reactions", `\`${user.tag}\` removed their reaction \`${emoji}\` in ${messageReaction.message.channel}.`) .addField("Reactions", `\`${user.tag}\` removed their reaction ${messageReaction.emoji} in ${messageReaction.message.channel}.`)
.setFooter("Message ID: " + messageReaction.message.id) .setFooter("Message ID: " + messageReaction.message.id)
.setThumbnail(message.author.avatarURL()) .setThumbnail(message.author.avatarURL())
.setTimestamp() .setTimestamp()

Loading…
Cancel
Save