From d941214503812267415db570f646cc69bc22664d Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 28 Aug 2022 22:13:42 -0400 Subject: exit --- src/listeners/other/promiseRejection.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); + } } } -- cgit