From ec1c340369c65f6fc103efe17abdb46146f589c3 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Thu, 22 Dec 2022 21:01:29 +1100 Subject: [PATCH] Rename limits_rate_disabled -> limits_rate_enabled and remove limits_guilds_hideOfflineMember --- src/api/middlewares/RateLimit.ts | 4 ++-- src/util/config/types/subconfigurations/limits/GuildLimits.ts | 1 - src/util/config/types/subconfigurations/limits/RateLimits.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/api/middlewares/RateLimit.ts b/src/api/middlewares/RateLimit.ts index b3976a16..7cbf6496 100644 --- a/src/api/middlewares/RateLimit.ts +++ b/src/api/middlewares/RateLimit.ts @@ -143,8 +143,8 @@ export default function rateLimit(opts: { } export async function initRateLimits(app: Router) { - const { routes, global, ip, error, disabled } = Config.get().limits.rate; - if (disabled) return; + const { routes, global, ip, error, enabled } = Config.get().limits.rate; + if (!enabled) return; console.log("Enabling rate limits..."); await listenEvent(EventRateLimit, (event) => { Cache.set(event.channel_id as string, event.data); diff --git a/src/util/config/types/subconfigurations/limits/GuildLimits.ts b/src/util/config/types/subconfigurations/limits/GuildLimits.ts index 91ad39ae..c5bc7884 100644 --- a/src/util/config/types/subconfigurations/limits/GuildLimits.ts +++ b/src/util/config/types/subconfigurations/limits/GuildLimits.ts @@ -4,5 +4,4 @@ export class GuildLimits { maxMembers: number = 25000000; maxChannels: number = 65535; maxChannelsInCategory: number = 65535; - hideOfflineMember: number = 3; } \ No newline at end of file diff --git a/src/util/config/types/subconfigurations/limits/RateLimits.ts b/src/util/config/types/subconfigurations/limits/RateLimits.ts index f337af49..3e05a18b 100644 --- a/src/util/config/types/subconfigurations/limits/RateLimits.ts +++ b/src/util/config/types/subconfigurations/limits/RateLimits.ts @@ -1,7 +1,7 @@ import { RouteRateLimit, RateLimitOptions } from "."; export class RateLimits { - disabled: boolean = true; + enabled: boolean = false; ip: Omit = { count: 500, window: 5