aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
+ }
}
}