Show owner command to the owner ( couldn't find a more elegant way to do it )

This commit is contained in:
loicbersier 2019-11-27 20:24:25 +01:00
parent dc248cdb57
commit c9a2cd520c

View file

@ -76,14 +76,27 @@ class HelpCommand extends Command {
.setFooter(`All the available prefix: ${prefix.join(' | ')}`); .setFooter(`All the available prefix: ${prefix.join(' | ')}`);
for (const category of this.handler.categories.values()) { for (const category of this.handler.categories.values()) {
const title = { let title;
general: '📝\u2000General', if (message.author.id == this.client.ownerID) {
fun: '🎉\u2000Fun', title = {
minigame: '🕹\u2000Minigames (WIP)', general: '📝\u2000General',
images: '🖼\u2000Images', fun: '🎉\u2000Fun',
utility: '🔩\u2000Utility', minigame: '🕹\u2000Minigames (WIP)',
admin: '⚡\u2000Admin', images: '🖼\u2000Images',
}[category.id]; utility: '🔩\u2000Utility',
admin: '⚡\u2000Admin',
owner: '🛠️\u2000Owner',
}[category.id];
} else {
title = {
general: '📝\u2000General',
fun: '🎉\u2000Fun',
minigame: '🕹\u2000Minigames (WIP)',
images: '🖼\u2000Images',
utility: '🔩\u2000Utility',
admin: '⚡\u2000Admin',
}[category.id];
}
if (title) embed.addField(title, `\`${category.map(cmd => cmd.aliases[0]).join('` `')}\``); if (title) embed.addField(title, `\`${category.map(cmd => cmd.aliases[0]).join('` `')}\``);
} }