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
@@ -27,11 +27,10 @@ module.exports = class FirstMessageCommand extends Command {
}
const messages = await channel.messages.fetch({ after: 1, limit: 1 });
const message = messages.first();
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}`)
+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}`)
+1 -2
View File
@@ -25,10 +25,9 @@ module.exports = class UserCommand extends Command {
}
async run(msg, { user }) {
const format = user.avatar && user.avatar.startsWith('a_') ? 'gif' : 'png';
const embed = new MessageEmbed()
.setAuthor(user.tag)
.setThumbnail(user.displayAvatarURL({ format }));
.setThumbnail(user.displayAvatarURL({ format: 'png', dynamic: true }));
let description = stripIndents`
**General User Info:**
• ID: ${user.id}