mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-06 13:40:16 +08:00
fix: only send ban event to the bot if the user was actually banned
This commit is contained in:
parent
2000cd92c6
commit
219b41302e
1 changed files with 6 additions and 4 deletions
|
@ -881,10 +881,12 @@ export async function recordAutoBanEvent(
|
|||
uid
|
||||
);
|
||||
|
||||
const discordIdIsValid =
|
||||
user.discordId !== undefined && user.discordId !== "";
|
||||
if (discordIdIsValid) {
|
||||
await GeorgeQueue.userBanned(user.discordId as string, true);
|
||||
if (banningUser) {
|
||||
const discordIdIsValid =
|
||||
user.discordId !== undefined && user.discordId !== "";
|
||||
if (discordIdIsValid) {
|
||||
await GeorgeQueue.userBanned(user.discordId as string, true);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue