From 069f45a85a8154d1b5f06b1e913e3b51d267b729 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Tue, 17 Aug 2021 12:38:48 -0400 Subject: warnings be gone --- src/listeners/other/promiseRejection.ts | 4 ++-- src/listeners/other/uncaughtException.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/listeners/other/promiseRejection.ts b/src/listeners/other/promiseRejection.ts index ed0d35d..24493f7 100644 --- a/src/listeners/other/promiseRejection.ts +++ b/src/listeners/other/promiseRejection.ts @@ -10,13 +10,13 @@ export default class PromiseRejectionListener extends BushListener { public override async exec(error: Error): Promise { // 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.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') }], + 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 045e524..5f4bd46 100644 --- a/src/listeners/other/uncaughtException.ts +++ b/src/listeners/other/uncaughtException.ts @@ -10,13 +10,13 @@ export default class UncaughtExceptionListener extends BushListener { public override async exec(error: Error): Promise { // 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.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') }], + fields: [{ name: 'error', value: await util.codeblock(`${error?.stack ?? error}`, 1024, 'js') }], color: util.colors.error } ] -- cgit