From 83edaf8281b09efbef6ed894526ec5df895ab02e Mon Sep 17 00:00:00 2001 From: Bsian Date: Mon, 14 Oct 2019 23:01:05 +0100 Subject: [PATCH] Command stuff --- src/Client.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Client.ts b/src/Client.ts index ab4df56..e8bb57f 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -4,11 +4,17 @@ import fs from 'fs-extra'; import path from 'path'; import config from './config.json'; +const options: any = { + getAllUsers: true, + restMode: true, + defaultImageFormat: 'png' +} + export default class Client extends Eris.Client { public commands: Map; public aliases: Map; constructor() { - super(config.token); + super(config.token, options); this.commands = new Map(); this.aliases = new Map(); @@ -18,14 +24,8 @@ export default class Client extends Eris.Client { // eslint-disable-next-line no-useless-catch try { const command = new (require(commandPath))(this); - if (command.init) { command.init(this); } - this.commands.set(command.help.name, command); - if (command.config.aliases) { - command.config.aliases.forEach(alias => { - this.aliases.set(alias, command.help.name); - }); - } - return `Successfully loaded ${command.help.name}.`; + this.commands.set(command.name, command) + return `Successfully loaded ${command.name}.`; } catch (err) { throw err; } }