mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-24 23:07:25 +08:00
made sure not to send the command to the bot if the discordid is undefined
This commit is contained in:
parent
2e4761fa5e
commit
c2bde75103
1 changed files with 6 additions and 1 deletions
|
|
@ -367,7 +367,12 @@ exports.testCompleted = functions.https.onCall((request, response) => {
|
|||
request.obj
|
||||
)}`
|
||||
);
|
||||
if (obj.mode === "time" && String(obj.mode2) === "60") {
|
||||
if (
|
||||
obj.mode === "time" &&
|
||||
String(obj.mode2) === "60" &&
|
||||
obj.discordId !== null &&
|
||||
obj.discordId !== undefined
|
||||
) {
|
||||
console.log(
|
||||
`sending command to the bot to update the role for user ${request.uid} with wpm ${obj.wpm}`
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue