diff --git a/backend/src/plugins/ModActions/functions/banUserId.ts b/backend/src/plugins/ModActions/functions/banUserId.ts index a0eab649..bb7f691e 100644 --- a/backend/src/plugins/ModActions/functions/banUserId.ts +++ b/backend/src/plugins/ModActions/functions/banUserId.ts @@ -40,7 +40,7 @@ export async function banUserId( error: "Invalid user", }; } - if (reason) reason = parseReason(config, reason); + reason &&= parseReason(config, reason); // Attempt to message the user *before* banning them, as doing it after may not be possible let notifyResult: UserNotificationResult = { method: null, success: true };