From 376bfcc7ab473150cfc94262181ae238786b36a7 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 18 Mar 2020 02:36:02 +0100 Subject: [PATCH] Fix avatar command --- commands/utility/avatar.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/utility/avatar.js b/commands/utility/avatar.js index 153039b..947d25f 100644 --- a/commands/utility/avatar.js +++ b/commands/utility/avatar.js @@ -27,7 +27,8 @@ class AvatarCommand extends Command { if (!args.user) { - let format = message.author.displayAvatarURL().substr(message.author.displayAvatarURL().length - 3); + let format = message.author.displayAvatarURL({ dynamic: true }).substr(message.author.displayAvatarURL({ dynamic: true }).length - 3); + console.log(format); if (format == 'gif') { avatarEmbed.setAuthor(message.author.username); avatarEmbed.setDescription(`[gif](${message.author.displayAvatarURL({ format: 'gif', size: 2048 })})`); @@ -39,7 +40,8 @@ class AvatarCommand extends Command { } return message.channel.send({embed: avatarEmbed}); } else { - let format = args.user.displayAvatarURL().substr(args.user.displayAvatarURL().length - 3); + let format = args.user.displayAvatarURL({ dynamic: true }).substr(args.user.displayAvatarURL({ dynamic: true }).length - 3); + console.log(format); if (format == 'gif') { avatarEmbed.setAuthor(args.user.username); avatarEmbed.setDescription(`[gif](${args.user.displayAvatarURL({ format: 'gif', size: 2048 })})`);