From ed59b7f1827ab93573b079144c3eeaa01ce40492 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Tue, 26 Oct 2021 20:07:19 -0400 Subject: clean up, bug fixes --- src/lib/extensions/discord-akairo/BushClient.ts | 6 +++--- src/lib/extensions/discord-akairo/BushClientUtil.ts | 2 +- src/lib/extensions/discord-akairo/BushCommand.ts | 10 ++++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src/lib/extensions/discord-akairo') diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 6133dba..32f43be 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -296,7 +296,7 @@ export class BushClient extends AkairoClient { + async #init() { this.commandHandler.useListenerHandler(this.listenerHandler); this.commandHandler.useInhibitorHandler(this.inhibitorHandler); this.commandHandler.ignorePermissions = this.config.owners; @@ -344,7 +344,7 @@ export class BushClient extends AkairoClient { + public async dbPreInit() { try { await this.db.authenticate(); Global.initModel(this.db); @@ -369,7 +369,7 @@ export class BushClient extends AkairoClient { + public async start() { eventsIntercept.patch(this); //@ts-expect-error: no typings this.intercept('ready', async (arg, done) => { diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index a833c75..32081ed 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -510,7 +510,7 @@ export class BushClientUtil extends ClientUtil { /** * Wait an amount in seconds. */ - public async sleep(s: number): Promise { + public async sleep(s: number) { return new Promise((resolve) => setTimeout(resolve, s * 1000)); } diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts index 22d4aae..e3066aa 100644 --- a/src/lib/extensions/discord-akairo/BushCommand.ts +++ b/src/lib/extensions/discord-akairo/BushCommand.ts @@ -148,8 +148,8 @@ export interface BushCommandOptions extends Omit