Browse Source

Use client.user.defaultAvatarURL when message.author is not defined

master
Abheek Dhawan 4 years ago
parent
commit
b708eff6f3
  1. 2
      index.js

2
index.js

@ -661,7 +661,7 @@ client.on('messageDelete', message => {
messageAvatar = message.author.avatarURL(); messageAvatar = message.author.avatarURL();
} else { } else {
messageAuthor = "Message was not cached"; messageAuthor = "Message was not cached";
messageAvatar = message.author.defaultAvatarURL; messageAvatar = client.user.defaultAvatarURL;
} }
if (!messageContent) { if (!messageContent) {
messageContent = "[NONE]"; messageContent = "[NONE]";

Loading…
Cancel
Save