diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-17 12:38:48 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-17 12:38:48 -0400 |
commit | 069f45a85a8154d1b5f06b1e913e3b51d267b729 (patch) | |
tree | 33a1a1d1e8d1dfe7b4097ced39188583dcae32fe /src/listeners | |
parent | ffc3af3cd00e3cdd2ec473c0c5803b274a8c9e95 (diff) | |
download | tanzanite-069f45a85a8154d1b5f06b1e913e3b51d267b729.tar.gz tanzanite-069f45a85a8154d1b5f06b1e913e3b51d267b729.tar.bz2 tanzanite-069f45a85a8154d1b5f06b1e913e3b51d267b729.zip |
warnings be gone
Diffstat (limited to 'src/listeners')
-rw-r--r-- | src/listeners/other/promiseRejection.ts | 4 | ||||
-rw-r--r-- | src/listeners/other/uncaughtException.ts | 4 |
2 files changed, 4 insertions, 4 deletions
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<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.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<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.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 } ] |