Use avatarURL dynamic feature

This commit is contained in:
Dragon Fire
2020-03-01 15:49:18 -05:00
parent 13d6777943
commit c40eede245
3 changed files with 5 additions and 8 deletions
+2 -3
View File
@@ -21,11 +21,10 @@ module.exports = class MessageCommand extends Command {
}
run(msg, { message }) {
const format = message.author.avatar && message.author.avatar.startsWith('a_') ? 'gif' : 'png';
const embed = new MessageEmbed()
.setColor(message.member ? message.member.displayHexColor : 0x00AE86)
.setThumbnail(message.author.displayAvatarURL({ format }))
.setAuthor(message.author.tag, message.author.displayAvatarURL({ format }))
.setThumbnail(message.author.displayAvatarURL({ format: 'png', dynamic: true }))
.setAuthor(message.author.tag, message.author.displayAvatarURL({ format: 'png', dynamic: true }))
.setDescription(message.content)
.setTimestamp(message.createdAt)
.setFooter(`ID: ${message.id}`)