From 2ada6baf6b2d531b76ff1e87beeb66999bd2a8fe Mon Sep 17 00:00:00 2001 From: Blocks <51055767+Blocksnmore@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:03:53 -0500 Subject: [PATCH] Fix reconnection handler --- index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 95a5f61..845697d 100644 --- a/index.ts +++ b/index.ts @@ -75,8 +75,7 @@ let reconnectHandler: number | undefined; bot.on("gatewayError", (err) => { console.log("Gateway error occured", err); if ( - err.message == - "Error: failed to lookup address information: Temporary failure in name resolution" + err.message.startsWith("NetworkError") ) { console.log("Error resolving DNS, attempting Automatic reconnects"); if (reconnectHandler == undefined) {