fetch spamming ss api
All checks were successful
Deploy Backend / docker (ubuntu-latest) (push) Successful in 48s

This commit is contained in:
Lee 2024-10-19 09:58:30 +01:00
parent 1f4be74c54
commit a773488e9b

@ -46,10 +46,6 @@ export class ScoreService {
const score = getScoreSaberScoreFromToken(scoreToken, leaderboardToken); const score = getScoreSaberScoreFromToken(scoreToken, leaderboardToken);
const leaderboard = getScoreSaberLeaderboardFromToken(leaderboardToken); const leaderboard = getScoreSaberLeaderboardFromToken(leaderboardToken);
const playerInfo = score.playerInfo; const playerInfo = score.playerInfo;
const player = await scoresaberService.lookupPlayer(playerInfo.id);
if (!player) {
return;
}
// Not ranked // Not ranked
if (leaderboard.stars <= 0) { if (leaderboard.stars <= 0) {
@ -60,6 +56,11 @@ export class ScoreService {
return; return;
} }
const player = await scoresaberService.lookupPlayer(playerInfo.id);
if (!player) {
return;
}
await logToChannel( await logToChannel(
DiscordChannels.numberOneFeed, DiscordChannels.numberOneFeed,
new EmbedBuilder() new EmbedBuilder()