From 47444a26ed6ee97eebe20fcfdc919482cc01be82 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 29 Jun 2020 17:26:39 -0400 Subject: [PATCH] fixes for command resolve --- src/class/Client.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/class/Client.ts b/src/class/Client.ts index 8564287..5e96d72 100644 --- a/src/class/Client.ts +++ b/src/class/Client.ts @@ -110,6 +110,13 @@ export default class Client extends Eris.Client { const cmdFiles = Object.values(commandFiles); for (const Cmd of cmdFiles) { const command = new Cmd(this); + if (command.subcmds.length) { + command.subcmds.forEach((C) => { + const cmd: Command = new C(this); + command.subcommands.add(cmd.name, cmd); + }); + } + delete command.subcmds; this.commands.add(command.name, command); this.signale.success(`Successfully loaded command: ${command.name}`); }