mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
fix: allow 0 deleteMessageDays and fix upper limit
This commit is contained in:
parent
feeb048855
commit
24cc532e86
2 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue