From 76e189cbc9ee338dd942372dcbb0214a079e118e Mon Sep 17 00:00:00 2001 From: Matthew R Date: Fri, 18 Dec 2020 19:26:28 -0500 Subject: [PATCH] fixes --- src/class/Client.ts | 4 ---- src/main.ts | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/class/Client.ts b/src/class/Client.ts index 51c110d..4f2b4fd 100644 --- a/src/class/Client.ts +++ b/src/class/Client.ts @@ -8,8 +8,6 @@ import { Account, AccountInterface, Moderation, ModerationInterface, Domain, Dom import { emojis } from '../stores'; import { Command, CSCLI, Util, Collection, Server, Event } from '.'; -import * as handlerFiles from '../cscli'; - export default class Client extends Eris.Client { public config: { 'token': string; 'cloudflare': string; 'prefix': string; 'emailPass': string; 'mongoURL': string; 'port': number; 'keyPair': { 'publicKey': string; 'privateKey': string; }; vendorKey: string; internalKey: string; }; @@ -141,8 +139,6 @@ export default class Client extends Eris.Client { }); this.server = new Server(this, { port: this.config.port }); // eslint-disable-next-line no-new - const cscli = new CSCLI(this); - cscli.load(handlerFiles); const corepath = '/opt/CloudServices/dist'; const cmdFiles = await fs.readdir('/opt/CloudServices/dist/commands'); diff --git a/src/main.ts b/src/main.ts index 65bc183..046ea57 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,7 @@ -import { Client } from './class'; +import { Client, CSCLI } from './class'; import * as eventFiles from './events'; import * as commandFiles from './commands'; +import * as handlerFiles from './cscli'; // eslint-disable-next-line no-new async function main() { @@ -9,6 +10,8 @@ async function main() { await client.loadEvents(eventFiles); await client.loadFunctions(); await client.init(); + const cscli = new CSCLI(client); + cscli.load(handlerFiles); } main();