mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
fix(voice): resolve voice channel detection after bot reboot
- Move voice state population outside settings conditional in GuildCreate (now runs on every gateway resume, not just new guild joins) - Make checkVoiceChannels() async with Fluxer API fallback (fetches member voice state directly when cache is empty after reboot) - Fix PlayerManager client reference passing - Update all callers to properly await checkVoiceChannels() - Fix leave command to work without requiring user in voice channel Fixes issue where bot couldn't detect users already in voice channels immediately after a reboot due to empty voice state cache.
This commit is contained in:
1 parent
b1e9964a56
commit
73c290e59c
7 files changed
+180
-403
No files matched your search
@@ -12,10 +12,6 @@ export const command = new CommandBuilder()
|
||||
// ── User count ────────────────────────────────────────────────────────────────
|
||||
|
||||
async function fetchUserCount(client) {
|
||||
// client.rest is a concept and is not available on @fluxerjs/core.
|
||||
// Use guild.memberCount (a cached integer Fluxer exposes on every Guild object)
|
||||
// instead of paginating the REST members endpoint.
|
||||
// Falls back to 0 per guild if the property is absent so the stat still renders.
|
||||
try {
|
||||
let total = 0;
|
||||
for (const guild of client.guilds.cache.values()) {
|
||||
|
||||
Reference in new issue
Block a user