From 19f7ae95d9f1e97469bcd8c39245253507bf475f Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 18 Jul 2020 08:57:14 -0400 Subject: [PATCH] Display File Formats in Avatar more accurately --- commands/info/avatar.js | 8 +++++++- package.json | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/commands/info/avatar.js b/commands/info/avatar.js index a5c95ebf..867906ac 100644 --- a/commands/info/avatar.js +++ b/commands/info/avatar.js @@ -1,6 +1,12 @@ const Command = require('../../structures/Command'); const { MessageEmbed } = require('discord.js'); const { embedURL } = require('../../util/Util'); +const displayFmts = { + jpg: 'JPEG', + png: 'PNG', + gif: 'GIF', + webp: 'WebP' +}; module.exports = class AvatarCommand extends Command { constructor(client) { @@ -29,7 +35,7 @@ module.exports = class AvatarCommand extends Command { const embed = new MessageEmbed() .setTitle(user.tag) .setDescription( - formats.map(fmt => embedURL(fmt.toUpperCase(), user.displayAvatarURL({ format: fmt, size: 2048 }))).join(' | ') + formats.map(fmt => embedURL(displayFmts[fmt], user.displayAvatarURL({ format: fmt, size: 2048 }))).join(' | ') ) .setImage(user.displayAvatarURL({ format, size: 2048 })) .setColor(0x00AE86); diff --git a/package.json b/package.json index b683703c..57522f34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "119.18.1", + "version": "119.18.2", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {