From 0d7e71b0c5056ebbfbbd02f71d1a35f2dff9bf4c Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Wed, 16 Feb 2022 17:35:53 -0500 Subject: refactor: declare global vars in bot.ts --- src/bot.ts | 2 ++ src/lib/extensions/discord-akairo/BushClient.ts | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/bot.ts b/src/bot.ts index 27a86d6..d18cd0d 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -8,6 +8,8 @@ const isDry = process.argv.includes('dry'); if (!isDry) new Sentry(dirname(fileURLToPath(import.meta.url)) || process.cwd()); BushClient.extendStructures(); const client = new BushClient(config); +global.client = client; +global.util = client.util; if (!isDry) await client.dbPreInit(); await client.init(); if (isDry) { diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 8dcbf05..904ab51 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -284,10 +284,6 @@ export class BushClient extends AkairoClient