log this to see if its why some don't get tracked
All checks were successful
Deploy Backend / docker (ubuntu-latest) (push) Successful in 1m12s

This commit is contained in:
Lee 2024-10-28 11:46:03 +00:00
parent 6c81316364
commit ce65116db4

@ -174,8 +174,8 @@ export class ScoreService {
leaderboardToken: ScoreSaberLeaderboardToken, leaderboardToken: ScoreSaberLeaderboardToken,
playerId?: string playerId?: string
) { ) {
playerId = playerId || scoreToken.leaderboardPlayerInfo.id; playerId = scoreToken.leaderboardPlayerInfo && (playerId || scoreToken.leaderboardPlayerInfo.id);
const playerName = scoreToken.leaderboardPlayerInfo.name; const playerName = (scoreToken.leaderboardPlayerInfo && scoreToken.leaderboardPlayerInfo.name) || "Unknown";
const leaderboard = getScoreSaberLeaderboardFromToken(leaderboardToken); const leaderboard = getScoreSaberLeaderboardFromToken(leaderboardToken);
const score = getScoreSaberScoreFromToken(scoreToken, leaderboard, playerId); const score = getScoreSaberScoreFromToken(scoreToken, leaderboard, playerId);
@ -195,6 +195,10 @@ export class ScoreService {
score.score score.score
)) !== null )) !== null
) { ) {
await logToChannel(
DiscordChannels.backendLogs,
new EmbedBuilder().setDescription(`Score ${score.scoreId} already tracked`)
);
return; return;
} }