fix(voice, 247): harden voice state routing, gateway recovery, and 24/7 rejoin resilience

- Normalize VOICE_STATE_UPDATE fields (snake_case and camelCase) and add fallback to playerMap for resolving disconnected channels
- Directly dispatch raw WebSocket VOICE_STATE_UPDATE packets to VoiceStateRouting to prevent missed disconnect events
- Clear RejoinBackoff cooldowns on gateway READY/RESUMED and suppress failure penalties during gateway downtime
- Reduce RejoinBackoff base cooldown from 120s to 30s for faster self-healing
- Defer 24/7 boot recovery and watchdog sweeps until gateway connection is confirmed active
- Add REST guild fetch and channel fallbacks in Watchdog247, GatewayHandler, and RejoinManager so uncached guilds never skip 24/7 channels
- Clean channel snowflake IDs on both sides in get247ChannelMode
This commit is contained in:
NoLogicAlan committed 2026-11-06 22:13:40 +03:00
1 parent cc07c35f2a
commit 6c826891eb
7 files changed
+111 -33

No files matched your search

+5 -3
View File
@@ -54,10 +54,12 @@ export function get247ChannelMode(set, channelId) {
if (!set?.get) return "off";
const raw = set.get("stay_247");
if (!raw || raw === "none") return "off";
const target = cleanId(channelId);
if (!target) return "off";
const channels = Array.isArray(raw)
? raw.map(id => String(id).trim()).filter(Boolean)
: [String(raw).trim()];
return channels.includes(channelId) ? "on" : "off";
? raw.map(id => cleanId(id)).filter(Boolean)
: [cleanId(raw)].filter(Boolean);
return channels.includes(target) ? "on" : "off";
}
/**