From adb6d20ddbb8cabac77149efde01048fd76b89d3 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 22 Aug 2021 12:07:09 +0100 Subject: [PATCH] giving roles only for time 60 --- backend/api/controllers/result.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/api/controllers/result.js b/backend/api/controllers/result.js index 6dff4410b..5848932ab 100644 --- a/backend/api/controllers/result.js +++ b/backend/api/controllers/result.js @@ -170,12 +170,11 @@ class ResultController { const isPb = await UserDAO.checkIfPb(uid, result); const tagPbs = await UserDAO.checkIfTagPb(uid, result); - if (isPb && user.discordId) { - BotDAO.updateDiscordRole(user.discordId, result.wpm); - } - if (result.mode === "time" && String(result.mode2) === "60") { UserDAO.incrementBananas(uid, result.wpm); + if (isPb && user.discordId) { + BotDAO.updateDiscordRole(user.discordId, result.wpm); + } } let tt = 0;