From bb179d28547bfcf7d5a1e4f0d87af13ec10d99c7 Mon Sep 17 00:00:00 2001 From: Bsian Date: Tue, 19 Nov 2019 20:20:33 +0000 Subject: [PATCH] I think this adds the subcommand properly to the subcommand list --- src/class/Util.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index 0459d73..61accda 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -64,11 +64,12 @@ export default class Util { } else if (resolvedCommand.subcommands.has(args[0])) { parentLabel += `${resolvedCommand.name} `; resolvedCommand = resolvedCommand.subcommands.get(args[0]); args.shift(); + parentLabel += `${resolvedCommand.name} `; } else { const subcommandArray = resolvedCommand.subcommands.toArray(); for (const subCmd of subcommandArray) { if (subCmd.aliases.includes(args[0])) { - parentLabel += `${resolvedCommand.name} `; resolvedCommand = subCmd; args.shift(); break; + parentLabel += `${resolvedCommand.name} `; resolvedCommand = subCmd; parentLabel += `${resolvedCommand.name} `; args.shift(); break; } if (subcommandArray.findIndex((v) => v === subCmd) === subcommandArray.length - 1) { hasSubCommands = false; break;