mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
shadows
This commit is contained in:
1 parent
687908ae0c
commit
034d64e830
1 file changed
+20
-2
@@ -1043,14 +1043,32 @@ export class Remix {
|
|||||||
const userObj = data?.member?.user ?? await client.users.fetch(userId).catch(() => null);
|
const userObj = data?.member?.user ?? await client.users.fetch(userId).catch(() => null);
|
||||||
if (userObj) {
|
if (userObj) {
|
||||||
const details = {
|
const details = {
|
||||||
event: "voiceStateUpdate",
|
event: "voiceStateUpdate",
|
||||||
userId,
|
userId,
|
||||||
guildId: resolvedGuildId,
|
guildId: resolvedGuildId,
|
||||||
channelId: channelId ?? null,
|
channelId: channelId ?? null,
|
||||||
oldChannelId: oldChannelId ?? null,
|
oldChannelId: oldChannelId ?? null,
|
||||||
};
|
};
|
||||||
this.dashboard.updateUser(details, userObj);
|
this.dashboard.updateUser(details, userObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const refChannel = channelId ?? oldChannelId;
|
||||||
|
const cleanId = refChannel ? String(refChannel).replace(/\D/g, "") : null;
|
||||||
|
|
||||||
|
if (cleanId) {
|
||||||
|
const player = this.players.playerMap.get(cleanId);
|
||||||
|
|
||||||
|
if (player) {
|
||||||
|
this.dashboard.updatePlayer({
|
||||||
|
guildId: player._guildId,
|
||||||
|
channelId: player._channelId,
|
||||||
|
playing: player.playing ?? false,
|
||||||
|
paused: player.paused ?? false,
|
||||||
|
queueLength: player.queue?.length ?? 0,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user