mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
hotfix
This commit is contained in:
1 parent
cc0b438ef6
commit
207c60ceec
5 files changed
+133
-74
No files matched your search
@@ -65,19 +65,23 @@ export function hasHumansInChannel({ guildId, channelId, client, voiceCache, obs
|
||||
}
|
||||
|
||||
|
||||
if (observedVoiceUsers) {
|
||||
try {
|
||||
const iterator = typeof observedVoiceUsers.iterateHumanUsers === "function"
|
||||
? observedVoiceUsers.iterateHumanUsers()
|
||||
: observedVoiceUsers.entries();
|
||||
if (observedVoiceUsers && observedVoiceUsers !== voiceCache) {
|
||||
if (typeof observedVoiceUsers.hasHumansInChannel === "function") {
|
||||
if (observedVoiceUsers.hasHumansInChannel(guildId, channelId)) return true;
|
||||
} else {
|
||||
try {
|
||||
const iterator = typeof observedVoiceUsers.iterateHumanUsers === "function"
|
||||
? observedVoiceUsers.iterateHumanUsers()
|
||||
: observedVoiceUsers.entries();
|
||||
|
||||
for (const [, info] of iterator) {
|
||||
const gId = String(info.guildId ?? "");
|
||||
const cId = String(info.channelId ?? "");
|
||||
if (gId === guildId && cId === channelId) return true;
|
||||
for (const [, info] of iterator) {
|
||||
const gId = String(info.guildId ?? "");
|
||||
const cId = String(info.channelId ?? "");
|
||||
if (gId === guildId && cId === channelId) return true;
|
||||
}
|
||||
} catch (e) {
|
||||
logger.warn("[VoiceStateResolver] ObservedVoiceUsers check failed:", e?.message);
|
||||
}
|
||||
} catch (e) {
|
||||
logger.warn("[VoiceStateResolver] ObservedVoiceUsers check failed:", e?.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user