From aae5a99e1acab8b290d4dcfc762d591ed3a55f60 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 28 Aug 2022 22:13:12 -0400 Subject: no error spam --- src/listeners/other/promiseRejection.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/listeners/other/promiseRejection.ts b/src/listeners/other/promiseRejection.ts index b56cef9..8ee73fe 100644 --- a/src/listeners/other/promiseRejection.ts +++ b/src/listeners/other/promiseRejection.ts @@ -24,7 +24,10 @@ export default class PromiseRejectionListener extends BotListener { `An unhanded promise rejection occurred:\n${formatError(error, true)}`, false ); - if (!error.message.includes('reason: getaddrinfo ENOTFOUND canary.discord.com')) + 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 }) }); -- cgit