forked from engineering/cloudservices
fixes for command resolve
parent
1af0f58b23
commit
47444a26ed
|
@ -110,6 +110,13 @@ export default class Client extends Eris.Client {
|
||||||
const cmdFiles = Object.values<typeof Command>(commandFiles);
|
const cmdFiles = Object.values<typeof Command>(commandFiles);
|
||||||
for (const Cmd of cmdFiles) {
|
for (const Cmd of cmdFiles) {
|
||||||
const command = new Cmd(this);
|
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.commands.add(command.name, command);
|
||||||
this.signale.success(`Successfully loaded command: ${command.name}`);
|
this.signale.success(`Successfully loaded command: ${command.name}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue