diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-22 21:01:29 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-22 21:01:29 +1100 |
commit | 18c6d11fc1a148cf0c494b1475ae7c653688eee5 (patch) | |
tree | d04a4f4843c5f075d34b0b035077c7695c10a675 | |
parent | Allow BitField's to be passed as number strings. Pretty sure it fixes #722 (diff) | |
download | server-18c6d11fc1a148cf0c494b1475ae7c653688eee5.tar.xz |
Rename limits_rate_disabled -> limits_rate_enabled and remove limits_guilds_hideOfflineMember
-rw-r--r-- | src/api/middlewares/RateLimit.ts | 4 | ||||
-rw-r--r-- | src/util/config/types/subconfigurations/limits/GuildLimits.ts | 1 | ||||
-rw-r--r-- | 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<RateLimitOptions, "bot_count"> = { count: 500, window: 5 |