Skip to content

Commit

Permalink
Fix reconnection handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Blocksnmore committed Aug 3, 2024
1 parent 045a1bd commit 2ada6ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2ada6ba

Please sign in to comment.