1
0
Fork 0

Fix parent label subcommand names not resolving

refactor/models
Bsian 2019-11-01 00:24:08 +00:00
parent 694461a303
commit 697111cb1d
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 2 additions and 2 deletions

View File

@ -64,11 +64,11 @@ export default class Util {
hasSubCommands = false; break; hasSubCommands = false; break;
} else if (resolvedCommand.subcommands.has(args[0])) { } else if (resolvedCommand.subcommands.has(args[0])) {
resolvedCommand = resolvedCommand.subcommands.get(args[0]); resolvedCommand = resolvedCommand.subcommands.get(args[0]);
args.shift(); parentLabel += ` ${args[0]}`; parentLabel += ` ${args[0]}`; args.shift();
} else { } else {
for (const subCmd of resolvedCommand.subcommands.toArray()) { for (const subCmd of resolvedCommand.subcommands.toArray()) {
if (subCmd.aliases.includes(args[0])) { if (subCmd.aliases.includes(args[0])) {
resolvedCommand = subCmd; args.shift(); parentLabel += ` ${args[0]}`; break; resolvedCommand = subCmd; parentLabel += ` ${args[0]}`; args.shift(); break;
} else { } else {
hasSubCommands = false; break; hasSubCommands = false; break;
} }