Refactored max limit for bulk-bans from AbsoluteRateLimits to GuildLimits as suggested by @devtomatocake

This commit is contained in:
aintDatCap
2024-07-24 19:22:40 +02:00
parent 5a20924477
commit e4a14d659a
4 changed files with 657 additions and 7 deletions
+1 -2
View File
@@ -54,8 +54,7 @@ router.post(
const userIds: Array<string> = req.body.user_ids;
if (!userIds) throw new HTTPError("The user_ids array is missing", 400);
const bulkBanLimit = Config.get().limits.absoluteRate.bulkBan;
if (bulkBanLimit.enabled && userIds.length > bulkBanLimit.limit)
if (userIds.length > Config.get().limits.guild.maxBulkBanUsers)
throw new HTTPError(
"The user_ids array must be between 1 and 200 in length",
400,