mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
feat(music): resolve guild ID in track play recording for improved accuracy
This commit is contained in:
1 parent
2907749bac
commit
bdee46b7f2
1 file changed
+3
-2
@@ -104,9 +104,10 @@ const PlayerEventsMixin = {
|
|||||||
if (humans.length === 1) userId = humans[0];
|
if (humans.length === 1) userId = humans[0];
|
||||||
}
|
}
|
||||||
TrackStats.increment(userId);
|
TrackStats.increment(userId);
|
||||||
if (player._guildId && song) {
|
const resolvedGuildId = player._resolveGuildId?.() ?? cleanId(player._guildId ?? player.channel?.guildId ?? "");
|
||||||
|
if (resolvedGuildId && song) {
|
||||||
GuildStats.recordPlay({
|
GuildStats.recordPlay({
|
||||||
guildId: cleanId(player._guildId),
|
guildId: resolvedGuildId,
|
||||||
track: song,
|
track: song,
|
||||||
userId,
|
userId,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user