Files
xiao/commands/info/emoji.js
T
Daniel Odendahl Jr 0933c8f318 Animated emoji, npm fix
2017-12-31 22:48:48 +00:00

39 lines
936 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const { Command } = require('discord.js-commando');
const { MessageEmbed } = require('discord.js');
module.exports = class EmojiInfoCommand extends Command {
constructor(client) {
super(client, {
name: 'emoji-info',
aliases: ['emoji'],
group: 'info',
memberName: 'emoji',
description: 'Responds with detailed information on an emoji.',
guildOnly: true,
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'emoji',
prompt: 'Which emoji would you like to get information on?',
type: 'emoji'
}
]
});
}
run(msg, { emoji }) {
const embed = new MessageEmbed()
.setColor(0x00AE86)
.setThumbnail(emoji.url)
.addField(' Name',
emoji.name, true)
.addField(' ID',
emoji.id, true)
.addField(' Creation Date',
emoji.createdAt.toDateString(), true)
.addField(' Animated?',
emoji.animated ? 'Yes' : 'No', true);
return msg.embed(embed);
}
};