From 0c808b1c93836bc5fc055399a564c1772c8a0f96 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Mon, 5 Apr 2021 00:24:03 -0500 Subject: [PATCH 1/3] Use emoji instead of emoji.name to display emojis instead of their names --- bot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.js b/bot.js index 811b62e..79b553c 100644 --- a/bot.js +++ b/bot.js @@ -805,7 +805,7 @@ client.on('messageReactionAdd', (messageReaction, user) => { .setTitle("Reaction Added") .setAuthor(message.author.tag, message.author.avatarURL()) .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) .setThumbnail(message.author.avatarURL()) .setTimestamp() @@ -884,7 +884,7 @@ client.on('messageReactionRemove', (messageReaction, user) => { const messageReactionRemoveEmbed = new Discord.MessageEmbed() .setTitle("Reaction Removed") .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) .setThumbnail(message.author.avatarURL()) .setTimestamp() From 3810f2eb46143862e5e62f925db90ba4d5006975 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Mon, 5 Apr 2021 08:22:54 -0500 Subject: [PATCH 2/3] =?UTF-8?q?Change=20>>=20to=20unicode=20=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bot.js b/bot.js index 79b553c..9f66fab 100644 --- a/bot.js +++ b/bot.js @@ -959,9 +959,9 @@ client.on('roleUpdate', (oldRole, newRole) => { const addedPerms = newRole.permissions.toArray().filter(perm => !oldRole.permissions.has(perm)); const roleUpdateEmbed = new Discord.MessageEmbed() .setTitle("Role Updated") - .addField("Name", `${oldRole.name} >> ${newRole.name}`) - .addField("Permissions", `${oldRole.permissions.bitfield} >> ${newRole.permissions.bitfield}`) - .addField("Mentionable", `${oldRole.mentionable} >> ${newRole.mentionable}`) + .addField("Name", `${oldRole.name} » ${newRole.name}`) + .addField("Permissions", `${oldRole.permissions.bitfield} » ${newRole.permissions.bitfield}`) + .addField("Mentionable", `${oldRole.mentionable} » ${newRole.mentionable}`) .setFooter("Role ID: " + newRole.id) .setTimestamp() .setColor('c9ff00'); @@ -1049,9 +1049,9 @@ client.on('guildMemberUpdate', (oldMember, newMember) => { } else if (addedRoles.array().length > 0) { memberUpdateEmbed.addField("Roles Added", addedRoles.map(r => `${r}`).join(' • ')); } else if (newMember.nickname !== oldMember.nickname) { - memberUpdateEmbed.addField("Nickname Changed", `\`${oldMember.nickname}\` >> \`${newMember.nickname}\``) + memberUpdateEmbed.addField("Nickname Changed", `\`${oldMember.nickname}\` » \`${newMember.nickname}\``) } else if (newMember.user.tag !== oldMember.user.tag) { - memberUpdateEmbed.addField("User Tag Changed", `\`${oldMember.user.tag}\` >> \`${newMember.user.tag}\``) + memberUpdateEmbed.addField("User Tag Changed", `\`${oldMember.user.tag}\` » \`${newMember.user.tag}\``) } else { return; } From 7e2db20995ee609dd6770d8bce93e36e3c48c816 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Mon, 5 Apr 2021 09:01:32 -0500 Subject: [PATCH 3/3] Improve reaction logging --- bot.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bot.js b/bot.js index 9f66fab..642518e 100644 --- a/bot.js +++ b/bot.js @@ -803,11 +803,11 @@ client.on('messageReactionAdd', (messageReaction, user) => { 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()) + .setAuthor(user.tag, user.avatarURL()) .addField("Link", `[Click here!](${message.url})`) - .addField("Reactions", `\`${user.tag}\` reacted with ${messageReaction.emoji}, along with ${numEmoji - 1} other people in ${messageReaction.message.channel}.`) + .addField("Reactions", `${user} reacted with ${messageReaction.emoji} to ${messageReaction.message.author}'s message, along with ${numEmoji - 1} other people in ${messageReaction.message.channel}.`) .setFooter("Message ID: " + messageReaction.message.id) - .setThumbnail(message.author.avatarURL()) + .setThumbnail(user.avatarURL()) .setTimestamp() .setColor('00aaff'); @@ -883,10 +883,11 @@ client.on('messageReactionRemove', (messageReaction, user) => { const emoji = messageReaction.emoji.name; const messageReactionRemoveEmbed = new Discord.MessageEmbed() .setTitle("Reaction Removed") + .setAuthor(user.tag, user.avatarURL()) .addField("Link", `[Click here!](${message.url})`) - .addField("Reactions", `\`${user.tag}\` removed their reaction ${messageReaction.emoji} in ${messageReaction.message.channel}.`) + .addField("Reactions", `\`${user}\` removed their reaction ${messageReaction.emoji} on ${messageReaction.message.author}'s message in ${messageReaction.message.channel}.`) .setFooter("Message ID: " + messageReaction.message.id) - .setThumbnail(message.author.avatarURL()) + .setThumbnail(user.avatarURL()) .setTimestamp() .setColor('e7778b');