Skip to content

Commit 93a744b

Browse files
committed
fix: dont award discord roles if user opted out of leaderboards
1 parent 1f771e3 commit 93a744b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

backend/src/api/controllers/result.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,12 @@ export async function addResult(
437437

438438
if (completedEvent.mode === "time" && completedEvent.mode2 === "60") {
439439
void UserDAL.incrementBananas(uid, completedEvent.wpm);
440-
if (isPb && user.discordId !== undefined && user.discordId !== "") {
440+
if (
441+
isPb &&
442+
user.discordId !== undefined &&
443+
user.discordId !== "" &&
444+
user.lbOptOut !== true
445+
) {
441446
void GeorgeQueue.updateDiscordRole(user.discordId, completedEvent.wpm);
442447
}
443448
}

0 commit comments

Comments
 (0)