From c9a2cd520c9e60ad52fa0e3ceb2257516b823ab1 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 27 Nov 2019 20:24:25 +0100 Subject: [PATCH] Show owner command to the owner ( couldn't find a more elegant way to do it ) --- commands/utility/help.js | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/commands/utility/help.js b/commands/utility/help.js index 80eeab3b..4a317ae4 100644 --- a/commands/utility/help.js +++ b/commands/utility/help.js @@ -76,14 +76,27 @@ class HelpCommand extends Command { .setFooter(`All the available prefix: ${prefix.join(' | ')}`); for (const category of this.handler.categories.values()) { - const title = { - general: '📝\u2000General', - fun: '🎉\u2000Fun', - minigame: '🕹\u2000Minigames (WIP)', - images: '🖼\u2000Images', - utility: '🔩\u2000Utility', - admin: '⚡\u2000Admin', - }[category.id]; + let title; + if (message.author.id == this.client.ownerID) { + title = { + general: '📝\u2000General', + fun: '🎉\u2000Fun', + minigame: '🕹\u2000Minigames (WIP)', + images: '🖼\u2000Images', + 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('` `')}\``); }