Browse Source

Fix thumbnail if message.author is null

master
Abheek Dhawan 4 years ago
parent
commit
99fb101501
  1. 2
      bot.js

2
bot.js

@ -669,7 +669,7 @@ client.on('messageDelete', message => {
.addField('Author', message.author ? message.author.tag : "Message not cached") .addField('Author', message.author ? message.author.tag : "Message not cached")
.addField('Message', message.content ? message.content : "Message not cached") .addField('Message', message.content ? message.content : "Message not cached")
.addField('Channel', message.channel ? message.channel : "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) .setFooter("ID: " + message.id)
.setTimestamp() .setTimestamp()
.setColor('e7778b'); .setColor('e7778b');

Loading…
Cancel
Save