aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/extensions')
-rw-r--r--src/lib/extensions/BushClient.ts2
-rw-r--r--src/lib/extensions/BushClientUtil.ts10
2 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/extensions/BushClient.ts b/src/lib/extensions/BushClient.ts
index d0758d4..b12fd52 100644
--- a/src/lib/extensions/BushClient.ts
+++ b/src/lib/extensions/BushClient.ts
@@ -110,7 +110,7 @@ export class BushClient extends AkairoClient {
dialect: 'postgres',
host: this.config.db.host,
port: this.config.db.port,
- logging: (a, b) => this.logger.debug(a)
+ logging: this.config.logging ? (a) => this.logger.debug(a) : false
});
this.logger = new BushLogger(this);
}
diff --git a/src/lib/extensions/BushClientUtil.ts b/src/lib/extensions/BushClientUtil.ts
index 4d428ee..a6b049a 100644
--- a/src/lib/extensions/BushClientUtil.ts
+++ b/src/lib/extensions/BushClientUtil.ts
@@ -1,3 +1,5 @@
+/* eslint-disable @typescript-eslint/no-explicit-any */
+/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { exec } from 'child_process';
import { ClientUtil } from 'discord-akairo';
import {
@@ -484,9 +486,13 @@ export class BushClientUtil extends ClientUtil {
return array.join(', ');
}
- public async insertOrRemoveFromGlobal(action: 'add' | 'remove', key: keyof typeof BushCache, value: any) {
+ public async insertOrRemoveFromGlobal(
+ action: 'add' | 'remove',
+ key: keyof typeof BushCache,
+ value: any
+ ): Promise<Global | void> {
const environment = this.client.config.dev ? 'development' : 'production';
- let row = await Global.findByPk(environment);
+ const row = await Global.findByPk(environment);
const oldValue: any[] = row[key];
let newValue: any[];
if (action === 'add') {