From ba71d2ebdf4e27bac84ed219f854e85b30b16948 Mon Sep 17 00:00:00 2001 From: Bsian Date: Tue, 3 Dec 2019 23:26:10 +0000 Subject: [PATCH] Fixed stuff for subcommands --- src/class/Util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index bad0b79..adc5aa0 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -50,7 +50,7 @@ export default class Util { if (!resolvedCommand) return Promise.resolve(null); query.shift(); - while (resolvedCommand.subcommands.size) { + while (resolvedCommand.subcommands.size && query.length) { const subCommands = resolvedCommand.subcommands.toArray(); const found = subCommands.find((c) => c.name === query[0].toLowerCase() || c.aliases.includes(query[0].toLowerCase())); if (!found) break;