aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/other
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-31 22:46:32 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-31 22:46:32 -0400
commit710c1b9cc95d4f9cc5a437952c4cf89eca3f16cd (patch)
treec617d38a53064667e8d501aa1ed539ca1d8db3f7 /src/listeners/other
parent2f2a85707737753b23c8036de085c322641695e1 (diff)
downloadtanzanite-710c1b9cc95d4f9cc5a437952c4cf89eca3f16cd.tar.gz
tanzanite-710c1b9cc95d4f9cc5a437952c4cf89eca3f16cd.tar.bz2
tanzanite-710c1b9cc95d4f9cc5a437952c4cf89eca3f16cd.zip
misc fixes
Diffstat (limited to 'src/listeners/other')
-rw-r--r--src/listeners/other/promiseRejection.ts2
-rw-r--r--src/listeners/other/uncaughtException.ts2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/listeners/other/promiseRejection.ts b/src/listeners/other/promiseRejection.ts
index f2623c6..ed0d35d 100644
--- a/src/listeners/other/promiseRejection.ts
+++ b/src/listeners/other/promiseRejection.ts
@@ -9,11 +9,13 @@ export default class PromiseRejectionListener extends BushListener {
}
public override async exec(error: Error): Promise<void> {
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
void client.console.error('PromiseRejection', `An unhanded promise rejection occurred:\n${error?.stack || error}`, false);
void client.console.channelError({
embeds: [
{
title: 'Unhandled promise rejection',
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
fields: [{ name: 'error', value: await util.codeblock(`${error?.stack || error}`, 1024, 'js') }],
color: util.colors.error
}
diff --git a/src/listeners/other/uncaughtException.ts b/src/listeners/other/uncaughtException.ts
index 76afab9..045e524 100644
--- a/src/listeners/other/uncaughtException.ts
+++ b/src/listeners/other/uncaughtException.ts
@@ -9,11 +9,13 @@ export default class UncaughtExceptionListener extends BushListener {
}
public override async exec(error: Error): Promise<void> {
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
void client.console.error('uncaughtException', `An uncaught exception occurred:\n${error?.stack || error}`, false);
void client.console.channelError({
embeds: [
{
title: 'An uncaught exception occurred',
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
fields: [{ name: 'error', value: await util.codeblock(`${error?.stack || error}`, 1024, 'js') }],
color: util.colors.error
}