From b708eff6f33a90446d5c323a5ab006de4763aa31 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 4 Apr 2021 00:51:31 -0500 Subject: [PATCH] Use client.user.defaultAvatarURL when message.author is not defined --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6220371..a8079df 100644 --- a/index.js +++ b/index.js @@ -661,7 +661,7 @@ client.on('messageDelete', message => { messageAvatar = message.author.avatarURL(); } else { messageAuthor = "Message was not cached"; - messageAvatar = message.author.defaultAvatarURL; + messageAvatar = client.user.defaultAvatarURL; } if (!messageContent) { messageContent = "[NONE]";