mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Make help message more informative
This commit is contained in:
+3
-3
@@ -72,9 +72,9 @@ module.exports = class CommandClient extends Client {
|
||||
|
||||
if (!this.dispatcher.isCommand(msg)) return;
|
||||
const parsed = await this.dispatcher.parseMessage(msg);
|
||||
if (typeof parsed === 'string') {
|
||||
const helpUsage = this.registry.commands.get('help').usage();
|
||||
await msg.reply(`${parsed}\n\nUse ${helpUsage} for more information.`);
|
||||
if (parsed.error) {
|
||||
const helpUsage = this.registry.commands.get('help').usage(parsed.command.name);
|
||||
await msg.reply(`${parsed.error}\n\nUse ${helpUsage} for more information.`);
|
||||
return;
|
||||
}
|
||||
const { command, args } = parsed;
|
||||
|
||||
Reference in New Issue
Block a user