2022-07-29 23:31:08 +05:00
|
|
|
const Command = require("../../base/Command"),
|
2022-07-31 17:08:00 +05:00
|
|
|
{ EmbedBuilder, parseEmoji } = require("discord.js");
|
2022-07-29 23:31:08 +05:00
|
|
|
|
|
|
|
class EmojiInfo extends Command {
|
|
|
|
constructor(client) {
|
|
|
|
super(client, {
|
|
|
|
name: "emoji",
|
|
|
|
dirname: __dirname,
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: false,
|
|
|
|
aliases: ["emi"],
|
|
|
|
memberPermissions: [],
|
|
|
|
botPermissions: ["SEND_MESSAGES"],
|
|
|
|
nsfw: false,
|
|
|
|
ownerOnly: false,
|
|
|
|
cooldown: 2000
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async run(message, args, data) {
|
|
|
|
const rawEmoji = args[0];
|
|
|
|
if (!rawEmoji) return message.error("administration/stealemoji:MISSING_EMOJI");
|
|
|
|
|
2022-07-31 17:08:00 +05:00
|
|
|
const parsedEmoji = parseEmoji(rawEmoji);
|
2022-07-29 23:31:08 +05:00
|
|
|
|
2022-07-31 17:08:00 +05:00
|
|
|
const embed = new EmbedBuilder()
|
2022-07-29 23:31:08 +05:00
|
|
|
.setAuthor({
|
|
|
|
name: message.translate("general/emoji:TITLE", {
|
|
|
|
emoji: parsedEmoji.name
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setFooter({
|
|
|
|
text: data.config.embed.footer
|
|
|
|
})
|
2022-07-31 17:08:00 +05:00
|
|
|
.addFields([
|
|
|
|
{
|
|
|
|
name: message.translate("general/emoji:NAME"),
|
|
|
|
value: parsedEmoji.name
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: message.translate("general/emoji:ANIMATED"),
|
|
|
|
value: parsedEmoji.animated ? message.translate("common:YES") : message.translate("common:NO")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: message.translate("general/emoji:ID"),
|
|
|
|
value: parsedEmoji.id ? parsedEmoji.id.toString() : message.translate("general/emoji:STANDART")
|
|
|
|
}
|
|
|
|
]);
|
2022-07-29 23:31:08 +05:00
|
|
|
|
|
|
|
message.reply({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = EmojiInfo;
|