From 99fb10150142a4642b6bb21467775102da6bdd64 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 4 Apr 2021 22:19:52 -0500 Subject: [PATCH] Fix thumbnail if message.author is null --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 25bfdec..2697dca 100644 --- a/bot.js +++ b/bot.js @@ -669,7 +669,7 @@ client.on('messageDelete', message => { .addField('Author', message.author ? message.author.tag : "Message not cached") .addField('Message', message.content ? message.content : "Message not cached") .addField('Channel', message.channel ? message.channel : "Message not cached") - .setThumbnail(message.author.avatarURL()) + .setThumbnail(message.author ? message.author.avatarURL() : client.user.defaultAvatarURL) .setFooter("ID: " + message.id) .setTimestamp() .setColor('e7778b');