Sort roles and emoji

This commit is contained in:
Daniel Odendahl Jr
2018-09-07 10:58:23 +00:00
parent b6803aebec
commit 2b0fe4bb80
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ module.exports = class EmojiListCommand extends Command {
}
run(msg, { type }) {
const emojis = msg.guild.emojis.filter(emoji => type === 'animated' ? emoji.animated : !emoji.animated);
const emojis = msg.guild.emojis.filter(emoji => type === 'animated' ? emoji.animated : !emoji.animated).sort();
if (!emojis.size) return msg.say(`This server has no ${type} custom emoji.`);
return msg.say(emojis.map(emoji => emoji.toString()).join(' '), { split: { char: ' ' } });
}