forked from engineering/cloudservices
More edits
parent
e8441563f3
commit
d01624fc11
|
@ -16,8 +16,6 @@ export default class Client extends Eris.Client {
|
|||
|
||||
public commands: Collection<Command>;
|
||||
|
||||
public aliases: Map<string, string>;
|
||||
|
||||
public db: { Account: mongoose.Model<AccountInterface>; Domain: mongoose.Model<DomainInterface>; Moderation: mongoose.Model<ModerationInterface>; };
|
||||
|
||||
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; }
|
||||
|
|
|
@ -4,12 +4,10 @@
|
|||
export default class Collection<V> extends Map<string, V> {
|
||||
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<V> extends Map<string, V> {
|
|||
} else {
|
||||
super();
|
||||
}
|
||||
this.baseObject = baseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,6 +34,7 @@ export default class Command {
|
|||
this.guildOnly = true;
|
||||
this.client = client;
|
||||
this.subcmds = [];
|
||||
this.subcommands = new Collection<Command>();
|
||||
this.permissions = {};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue