From 7b75102f8e90ed7c8e8eead338225195688123b2 Mon Sep 17 00:00:00 2001 From: Ibotmealot <42391199+Ibotmealot@users.noreply.github.com> Date: Sat, 19 Feb 2022 19:04:58 -0500 Subject: [PATCH] fix: allow 0 deleteMessageDays and fix upper limit --- backend/src/plugins/ModActions/functions/banUserId.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/ModActions/functions/banUserId.ts b/backend/src/plugins/ModActions/functions/banUserId.ts index 21d02738..9833ce2c 100644 --- a/backend/src/plugins/ModActions/functions/banUserId.ts +++ b/backend/src/plugins/ModActions/functions/banUserId.ts @@ -85,7 +85,7 @@ export async function banUserId( pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_BAN, userId); ignoreEvent(pluginData, IgnoredEventType.Ban, userId); try { - const deleteMessageDays = Math.min(30, Math.max(0, banOptions.deleteMessageDays ?? 1)); + const deleteMessageDays = Math.min(7, Math.max(0, banOptions.deleteMessageDays ?? 1)); await pluginData.guild.bans.create(userId as Snowflake, { days: deleteMessageDays, reason: reason ?? undefined,