mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-18 19:45:58 +08:00
fix: dont award discord roles if user opted out of leaderboards
This commit is contained in:
parent
1f771e3a09
commit
93a744b4ee
1 changed files with 6 additions and 1 deletions
|
@ -437,7 +437,12 @@ export async function addResult(
|
|||
|
||||
if (completedEvent.mode === "time" && completedEvent.mode2 === "60") {
|
||||
void UserDAL.incrementBananas(uid, completedEvent.wpm);
|
||||
if (isPb && user.discordId !== undefined && user.discordId !== "") {
|
||||
if (
|
||||
isPb &&
|
||||
user.discordId !== undefined &&
|
||||
user.discordId !== "" &&
|
||||
user.lbOptOut !== true
|
||||
) {
|
||||
void GeorgeQueue.updateDiscordRole(user.discordId, completedEvent.wpm);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue