I think this adds the subcommand properly to the subcommand list
parent
6651e3cc86
commit
bb179d2854
|
@ -64,11 +64,12 @@ export default class Util {
|
||||||
} else if (resolvedCommand.subcommands.has(args[0])) {
|
} else if (resolvedCommand.subcommands.has(args[0])) {
|
||||||
parentLabel += `${resolvedCommand.name} `;
|
parentLabel += `${resolvedCommand.name} `;
|
||||||
resolvedCommand = resolvedCommand.subcommands.get(args[0]); args.shift();
|
resolvedCommand = resolvedCommand.subcommands.get(args[0]); args.shift();
|
||||||
|
parentLabel += `${resolvedCommand.name} `;
|
||||||
} else {
|
} else {
|
||||||
const subcommandArray = resolvedCommand.subcommands.toArray();
|
const subcommandArray = resolvedCommand.subcommands.toArray();
|
||||||
for (const subCmd of subcommandArray) {
|
for (const subCmd of subcommandArray) {
|
||||||
if (subCmd.aliases.includes(args[0])) {
|
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) {
|
if (subcommandArray.findIndex((v) => v === subCmd) === subcommandArray.length - 1) {
|
||||||
hasSubCommands = false; break;
|
hasSubCommands = false; break;
|
||||||
|
|
Loading…
Reference in New Issue