aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord-akairo/BushClient.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-04 15:25:32 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-04 15:25:32 -0400
commitcf564dbb6435886f97e2e9870363144386af368d (patch)
treed535cd73f24a145ca9d7ce1a0e1174cba0d38b31 /src/lib/extensions/discord-akairo/BushClient.ts
parent34f0d1d3ff3e2a90193c9a4d4de29d8335160d6a (diff)
downloadtanzanite-cf564dbb6435886f97e2e9870363144386af368d.tar.gz
tanzanite-cf564dbb6435886f97e2e9870363144386af368d.tar.bz2
tanzanite-cf564dbb6435886f97e2e9870363144386af368d.zip
mute command
Diffstat (limited to 'src/lib/extensions/discord-akairo/BushClient.ts')
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index 6911573..ed5c90a 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -216,7 +216,11 @@ export class BushClient extends AkairoClient {
loaders[loader].loadAll();
await this.logger.success('Startup', `Successfully loaded <<${loader}>>.`, false);
} catch (e) {
- await this.logger.error('Startup', `Unable to load loader <<${loader}>> with error:\n${e?.stack}`, false);
+ await this.logger.error(
+ 'Startup',
+ `Unable to load loader <<${loader}>> with error:\n${typeof e === 'object' ? e?.stack : e}`,
+ false
+ );
}
}
await this.dbPreInit();
@@ -237,8 +241,12 @@ export class BushClient extends AkairoClient {
Models.StickyRole.initModel(this.db);
await this.db.sync({ alter: true }); // Sync all tables to fix everything if updated
await this.console.success('Startup', `Successfully connected to <<database>>.`, false);
- } catch (error) {
- await this.console.error('Startup', `Failed to connect to <<database>> with error:\n` + error?.stack, false);
+ } catch (e) {
+ await this.console.error(
+ 'Startup',
+ `Failed to connect to <<database>> with error:\n` + typeof e === 'object' ? e?.stack : e,
+ false
+ );
}
}