Make help message more informative

This commit is contained in:
Dragon Fire
2024-04-20 14:04:19 -04:00
parent ff55fc7370
commit ec2df48ee0
3 changed files with 41 additions and 25 deletions
+3 -3
View File
@@ -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;