mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
fix: enhance connection state checks in Player and Helpers247 modules
This commit is contained in:
1 parent
cc91e602fc
commit
7c7d94b3fb
3 files changed
+14
-9
No files matched your search
@@ -560,7 +560,8 @@ class Player extends EventEmitter {
|
||||
const check = () => {
|
||||
try {
|
||||
if (voiceConn.isConnected()) { clearTimeout(timeout); return resolve(); }
|
||||
if (voiceConn.connectionState === 0) { clearTimeout(timeout); return resolve(); }
|
||||
const cs = voiceConn.connectionState;
|
||||
if (cs === 2 || cs === "connected" || cs === "CONN_CONNECTED") { clearTimeout(timeout); return resolve(); }
|
||||
} catch (_) { clearTimeout(timeout); return resolve(); }
|
||||
setTimeout(check, 200);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user