mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Display File Formats in Avatar more accurately
This commit is contained in:
@@ -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);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "119.18.1",
|
||||
"version": "119.18.2",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user