From 757f7cc82a0c9bc4b6ea93d19309cb2948937337 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 4 Apr 2021 23:33:54 -0500 Subject: [PATCH] Only log message.content if there is any (reaction remove) --- bot.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot.js b/bot.js index d884c04..51d11b3 100644 --- a/bot.js +++ b/bot.js @@ -881,12 +881,15 @@ client.on('messageReactionRemove', (messageReaction, user) => { const messageReactionRemoveEmbed = new Discord.MessageEmbed() .setTitle("Reaction Removed") .addField("Link", `[Click here!](${message.url})`) - .addField("Message", message.content) .addField("Reactions", `\`${user.tag}\` removed their reaction \`${emoji}\` in ${messageReaction.message.channel}.`) .setFooter("Message ID: " + messageReaction.message.id) .setThumbnail(message.author.avatarURL()) .setTimestamp() .setColor('e7778b'); + + if (message.content) { + messageReactionRemoveEmbed.addField("Message", message.content); + } collection.findOne({ guild_id: messageReaction.message.guild.id }, (error, result) => { if (error) { console.error;