diff --git a/src/Client.ts b/src/Client.ts index 70efcea..c9285e9 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -16,8 +16,6 @@ export default class Client extends Eris.Client { public commands: Collection; - public aliases: Map; - public db: { Account: mongoose.Model; Domain: mongoose.Model; Moderation: mongoose.Model; }; public stores: { emojis: { success: string, loading: string, error: string }; }; @@ -73,8 +71,8 @@ export default class Client extends Eris.Client { const cmd: Command = new C(this); command.subcommands.add(cmd.name, cmd); }); - delete command.subcmds; } + delete command.subcmds; this.commands.add(command.name, command); this.signale.complete(`Loaded command ${command.name}`); } catch (err) { throw err; } diff --git a/src/class/Collection.ts b/src/class/Collection.ts index de7b09b..091a208 100644 --- a/src/class/Collection.ts +++ b/src/class/Collection.ts @@ -4,12 +4,10 @@ export default class Collection extends Map { baseObject: any - iterable: any[]|object - /** * Creates an instance of Collection */ - constructor({ base: baseObject = null, iterable = null }) { + constructor(iterable: any[]|object = null) { if (iterable && iterable instanceof Array) { // @ts-ignore super(iterable); @@ -19,7 +17,6 @@ export default class Collection extends Map { } else { super(); } - this.baseObject = baseObject; } /** diff --git a/src/class/Command.ts b/src/class/Command.ts index 88c8074..c19b7eb 100644 --- a/src/class/Command.ts +++ b/src/class/Command.ts @@ -34,6 +34,7 @@ export default class Command { this.guildOnly = true; this.client = client; this.subcmds = []; + this.subcommands = new Collection(); this.permissions = {}; } }