mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
Fix
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
const Command = require('../../structures/Command');
|
const Command = require('../../structures/Command');
|
||||||
const { MessageEmbed } = require('discord.js');
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
const { embedURL } = require('../../util/Util');
|
||||||
|
const displayFmts = {
|
||||||
|
jpg: 'JPEG',
|
||||||
|
png: 'PNG',
|
||||||
|
gif: 'GIF',
|
||||||
|
webp: 'WebP'
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = class ServerIconCommand extends Command {
|
module.exports = class ServerIconCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -14,7 +21,7 @@ module.exports = class ServerIconCommand extends Command {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(msg) {
|
run(msg) {
|
||||||
if (!msg.guild.icon) return msg.reply('This server has no icon.');
|
if (!msg.guild.icon) return msg.reply('This server has no icon.');
|
||||||
const formats = ['png', 'jpg', 'webp'];
|
const formats = ['png', 'jpg', 'webp'];
|
||||||
const format = msg.guild.icon && msg.guild.icon.startsWith('a_') ? 'gif' : 'png';
|
const format = msg.guild.icon && msg.guild.icon.startsWith('a_') ? 'gif' : 'png';
|
||||||
|
|||||||
Reference in New Issue
Block a user