feat(music): resolve guild ID in track play recording for improved accuracy

This commit is contained in:
NoLogicAlan committed 2026-11-21 00:46:51 +03:00
1 parent 2907749bac
commit bdee46b7f2
1 file changed
+3 -2
+3 -2
View File
@@ -104,9 +104,10 @@ const PlayerEventsMixin = {
if (humans.length === 1) userId = humans[0];
}
TrackStats.increment(userId);
if (player._guildId && song) {
const resolvedGuildId = player._resolveGuildId?.() ?? cleanId(player._guildId ?? player.channel?.guildId ?? "");
if (resolvedGuildId && song) {
GuildStats.recordPlay({
guildId: cleanId(player._guildId),
guildId: resolvedGuildId,
track: song,
userId,
});