1
0
Fork 0

Fixed stuff for subcommands

refactor/models
Bsian 2019-12-03 23:26:10 +00:00
parent 6796317c6c
commit ba71d2ebdf
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ export default class Util {
if (!resolvedCommand) return Promise.resolve(null); if (!resolvedCommand) return Promise.resolve(null);
query.shift(); query.shift();
while (resolvedCommand.subcommands.size) { while (resolvedCommand.subcommands.size && query.length) {
const subCommands = resolvedCommand.subcommands.toArray(); const subCommands = resolvedCommand.subcommands.toArray();
const found = subCommands.find((c) => c.name === query[0].toLowerCase() || c.aliases.includes(query[0].toLowerCase())); const found = subCommands.find((c) => c.name === query[0].toLowerCase() || c.aliases.includes(query[0].toLowerCase()));
if (!found) break; if (!found) break;