From 8974fd34df20a846b73573377343ccdfd610e85b Mon Sep 17 00:00:00 2001 From: NoLogicAlan Date: Tue, 18 Aug 2026 11:24:20 +0300 Subject: [PATCH] idk --- index.mjs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.mjs b/index.mjs index b18b51b..b881011 100644 --- a/index.mjs +++ b/index.mjs @@ -114,6 +114,7 @@ export class Remix { }; let presenceRotationIndex = presenceContents.length > 1 ? 1 : 0; let presenceRotationStarted = false; + let wsHandlerRearmStarted = false; const timers = config.timers ?? {}; this.T = { @@ -287,6 +288,14 @@ export class Remix { this._attachWsErrorHandlers(); + if (!wsHandlerRearmStarted) { + wsHandlerRearmStarted = true; + setInterval(() => { + this._attachWsErrorHandlers(); + this.gatewayHandler.attachRawListener(); + }, 5_000).unref?.(); + } + const botId = client.user?.id ?? "0"; await this.settingsMgr.setBotId(botId);