Skip to content

Commit

Permalink
⚡️ Use format option for avatar command (#407)
Browse files Browse the repository at this point in the history
Co-authored-by: Androz <[email protected]>
  • Loading branch information
Janastinou and Androz2091 authored Feb 20, 2021
1 parent 802e9b5 commit 10ddcce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/Images/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Avatar extends Command {

let user = await this.client.resolveUser(args[0]);
if(!user) user = message.author;
const avatarURL = user.displayAvatarURL({ size: 512, dynamic: true }).replace(".webp", ".png");
const avatarURL = user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' });
if(message.content.includes("-v")) message.channel.send("<"+avatarURL+">");
const attachment = new Discord.MessageAttachment(avatarURL, `avatar.${avatarURL.split(".").pop().split("?")[0]}`);
message.channel.send(attachment);
Expand All @@ -30,4 +30,4 @@ class Avatar extends Command {

}

module.exports = Avatar;
module.exports = Avatar;

0 comments on commit 10ddcce

Please sign in to comment.