aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-28 22:13:42 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-28 22:13:42 -0400
commitd941214503812267415db570f646cc69bc22664d (patch)
treef49726b2716d201335e9f8532bca96b610299057
parentaae5a99e1acab8b290d4dcfc762d591ed3a55f60 (diff)
downloadtanzanite-d941214503812267415db570f646cc69bc22664d.tar.gz
tanzanite-d941214503812267415db570f646cc69bc22664d.tar.bz2
tanzanite-d941214503812267415db570f646cc69bc22664d.zip
exit
-rw-r--r--src/listeners/other/promiseRejection.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/listeners/other/promiseRejection.ts b/src/listeners/other/promiseRejection.ts
index 8ee73fe..4435f4c 100644
--- a/src/listeners/other/promiseRejection.ts
+++ b/src/listeners/other/promiseRejection.ts
@@ -27,9 +27,12 @@ export default class PromiseRejectionListener extends BotListener {
if (
!error.message.includes('reason: getaddrinfo ENOTFOUND canary.discord.com') &&
!error.message.includes('Expected token to be set for this request, but none was present')
- )
+ ) {
void this.client.console.channelError({
embeds: await generateErrorEmbed(this.client, { type: 'unhandledRejection', error: error })
});
+ } else {
+ process.exit(1);
+ }
}
}