diff --git a/src/class/Client.ts b/src/class/Client.ts index 4aff505..f226f5f 100644 --- a/src/class/Client.ts +++ b/src/class/Client.ts @@ -3,8 +3,6 @@ import mongoose from 'mongoose'; import { promises as fs } from 'fs'; import { Collection, Command, Util, ServerManagement, Event } from '.'; import { Member, MemberInterface, Moderation, ModerationInterface, Redirect, RedirectInterface } from '../models'; -import * as eventFiles from '../events'; -import * as commandFiles from '../commands'; export default class Client extends eris.Client { public config: { token: string, prefix: string, guildID: string, mongoDB: string }; @@ -49,7 +47,7 @@ export default class Client extends eris.Client { }); } - public async loadEvents() { + public async loadEvents(eventFiles: { [s: string]: typeof Event; } | ArrayLike) { const evtFiles = Object.entries Event>(eventFiles); for (const [name, Ev] of evtFiles) { const event = new Ev(this); @@ -60,7 +58,7 @@ export default class Client extends eris.Client { } } - public async loadCommands() { + public async loadCommands(commandFiles: { [s: string]: typeof Command; } | ArrayLike) { const cmdFiles = Object.values Command>(commandFiles); for (const Cmd of cmdFiles) { const command = new Cmd(this); diff --git a/tsconfig.json b/tsconfig.json index 251319b..fc5e133 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */