File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import { addImportantLog } from "./logs";
3636import { Result as ResultType } from "@monkeytype/contracts/schemas/results" ;
3737import { Configuration } from "@monkeytype/contracts/schemas/configuration" ;
3838import { isToday , isYesterday } from "@monkeytype/util/date-and-time" ;
39+ import GeorgeQueue from "../queues/george-queue" ;
3940
4041export type DBUserTag = WithObjectId < UserTag > ;
4142
@@ -843,6 +844,7 @@ export async function recordAutoBanEvent(
843844 const user = await getPartialUser ( uid , "record auto ban event" , [
844845 "banned" ,
845846 "autoBanTimestamps" ,
847+ "discordId" ,
846848 ] ) ;
847849
848850 let ret = false ;
@@ -878,6 +880,13 @@ export async function recordAutoBanEvent(
878880 { autoBanTimestamps, banningUser } ,
879881 uid
880882 ) ;
883+
884+ const discordIdIsValid =
885+ user . discordId !== undefined && user . discordId !== "" ;
886+ if ( discordIdIsValid ) {
887+ await GeorgeQueue . userBanned ( user . discordId as string , true ) ;
888+ }
889+
881890 return ret ;
882891}
883892
You can’t perform that action at this time.
0 commit comments