From c8bbe2acb7b7ff46e7c8ad4081633f366ef1c71f Mon Sep 17 00:00:00 2001 From: Navy Date: Thu, 6 May 2021 20:21:07 +0300 Subject: [PATCH] added modhelp alias, triggers modhelp embed --- .../client/components/commands/information/Help.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/structure/client/components/commands/information/Help.js b/structure/client/components/commands/information/Help.js index 52b846c..f5de3e6 100644 --- a/structure/client/components/commands/information/Help.js +++ b/structure/client/components/commands/information/Help.js @@ -7,7 +7,8 @@ class HelpCommand extends Command { super(client, { name: 'help', module: 'information', - clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'] + clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'], + aliases: ['modhelp'] }); this.client = client; @@ -16,12 +17,11 @@ class HelpCommand extends Command { async execute(message, { params }) { - if (!params.length) return message.embed({ + const [key] = params; + if (message._caller === 'modhelp' || key?.toLowerCase() === 'modhelp') return this._modhelp(message); + else if (!params.length) return message.embed({ description: message.format('C_HELP') }); - - const [ key ] = params; - if (key.toLowerCase() === 'modhelp') return this._modhelp(message); let [ result ] = this.client.resolver.components(key, 'command'); if (!result) [ result ] = this.client.resolver.components(key, 'setting');