From 4cec0485af83b56c06c60fcabda8cd86bb2236b0 Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Mon, 5 Aug 2024 02:12:09 +0300 Subject: [PATCH] fix: shorten help output --- src/commands/help.command.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/commands/help.command.ts b/src/commands/help.command.ts index 29f42eb..b9dce99 100644 --- a/src/commands/help.command.ts +++ b/src/commands/help.command.ts @@ -38,9 +38,13 @@ export default command({ )}\`` } - cmd.examples.forEach((example) => { - description += `\n\t\t\t*e.g.:* ${example}` - }) + if (name) { + cmd.examples.forEach((example) => { + description += `\n\t\t\t*e.g.:* ${example}` + }) + } else { + description += `\n\t\t\tFor examples, use \`!help ${cmd.command}\`.` + } data.push({ command: name, description }) }