From ce65116db44b5b9e265b053e6ba6f84c7b1017c4 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 28 Oct 2024 11:46:03 +0000 Subject: [PATCH] log this to see if its why some don't get tracked --- projects/backend/src/service/score.service.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/backend/src/service/score.service.ts b/projects/backend/src/service/score.service.ts index e4fdc5d..d32cca4 100644 --- a/projects/backend/src/service/score.service.ts +++ b/projects/backend/src/service/score.service.ts @@ -174,8 +174,8 @@ export class ScoreService { leaderboardToken: ScoreSaberLeaderboardToken, playerId?: string ) { - playerId = playerId || scoreToken.leaderboardPlayerInfo.id; - const playerName = scoreToken.leaderboardPlayerInfo.name; + playerId = scoreToken.leaderboardPlayerInfo && (playerId || scoreToken.leaderboardPlayerInfo.id); + const playerName = (scoreToken.leaderboardPlayerInfo && scoreToken.leaderboardPlayerInfo.name) || "Unknown"; const leaderboard = getScoreSaberLeaderboardFromToken(leaderboardToken); const score = getScoreSaberScoreFromToken(scoreToken, leaderboard, playerId); @@ -195,6 +195,10 @@ export class ScoreService { score.score )) !== null ) { + await logToChannel( + DiscordChannels.backendLogs, + new EmbedBuilder().setDescription(`Score ${score.scoreId} already tracked`) + ); return; }