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}`); }