From 42f92cdc25379e90394af5c5f3f6a70e02f0e9bb Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 4 Apr 2021 21:03:43 -0500 Subject: [PATCH] Add author field for messageUpdate embed --- bot.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bot.js b/bot.js index 8f08510..ad70ff6 100644 --- a/bot.js +++ b/bot.js @@ -716,6 +716,7 @@ client.on('messageUpdate', (originalMessage, editedMessage) => { const editEmbed = new Discord.MessageEmbed() .setTitle("Message Edited") .setURL(editedMessage.url) + .setAuthor(editedMessage.author ? editedMessage.author.tag : "Unknown", editedMessage.author ? editedMessage.author.avatarURL() : client.user.defaultAvatarURL) .addField("Author", editedMessage.author.tag) .addField("Message", `<< ${originalMessage}\n>> ${editedMessage}`) .setThumbnail(editedMessage.author.avatarURL())