List emotes on server

This commit is contained in:
Loic Bersier 2018-09-22 18:36:06 +02:00
parent c774aeef90
commit d01d5afefc

View file

@ -0,0 +1,16 @@
const { Command } = require('discord.js-commando');
module.exports = class listEmoteCommand extends Command {
constructor(client) {
super(client, {
name: 'listemote',
group: 'fun',
memberName: 'listemote',
description: `List the emotes available on the server`,
});
}
async run(message, { text }) {
const emojiList = message.guild.emojis.map((e, x) => (x + ' = ' + e) + ' | ' +e.name).join('\n');
message.channel.send(emojiList);
}
};