mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
test
This commit is contained in:
1 parent
a4991d7047
commit
687908ae0c
3 files changed
+51
-8
No files matched your search
@@ -942,7 +942,7 @@ export class Remix {
|
||||
logger.guild(`[GuildDelete] Cleanup complete for server ${guildId}.`);
|
||||
});
|
||||
|
||||
client.on(Events.VoiceStateUpdate, (data) => {
|
||||
client.on(Events.VoiceStateUpdate, async (data) => {
|
||||
// data is the raw GatewayVoiceStateUpdateDispatchData — always snake_case
|
||||
const userId = data?.user_id;
|
||||
if (!userId) return;
|
||||
@@ -1037,6 +1037,23 @@ export class Remix {
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
// Notify dashboard of per-user voice-state change (join / leave / move)
|
||||
if (this.dashboard?.enabled) {
|
||||
try {
|
||||
const userObj = data?.member?.user ?? await client.users.fetch(userId).catch(() => null);
|
||||
if (userObj) {
|
||||
const details = {
|
||||
event: "voiceStateUpdate",
|
||||
userId,
|
||||
guildId: resolvedGuildId,
|
||||
channelId: channelId ?? null,
|
||||
oldChannelId: oldChannelId ?? null,
|
||||
};
|
||||
this.dashboard.updateUser(details, userObj);
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user