Calculate format to gif if it's a gif in info

This commit is contained in:
Daniel Odendahl Jr
2018-10-09 01:50:45 +00:00
parent 475964abf4
commit 53e2bdea13
3 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -21,10 +21,11 @@ module.exports = class MessageInfoCommand extends Command {
}
run(msg, { message }) {
const format = msg.author.avatar && msg.author.avatar.startsWith('a_') ? 'gif' : 'png';
const embed = new MessageEmbed()
.setColor(message.member ? message.member.displayHexColor : 0x00AE86)
.setThumbnail(message.author.displayAvatarURL({ format: 'png' }))
.setAuthor(msg.author.tag, msg.author.displayAvatarURL({ format: 'png' }))
.setThumbnail(message.author.displayAvatarURL({ format }))
.setAuthor(msg.author.tag, msg.author.displayAvatarURL({ format }))
.setDescription(message.content)
.setTimestamp(message.createdAt)
.setFooter(`ID: ${message.id}`)