forked from Galactic/galactic-bot
added modhelp alias, triggers modhelp embed
This commit is contained in:
parent
6efedf8fa5
commit
c8bbe2acb7
@ -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,13 +17,12 @@ 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');
|
||||
if (!result) result = this.client.resolver.componentsByTag(key, 'any', false);
|
||||
|
Loading…
Reference in New Issue
Block a user