summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-22 21:01:29 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-22 21:01:29 +1100
commit18c6d11fc1a148cf0c494b1475ae7c653688eee5 (patch)
treed04a4f4843c5f075d34b0b035077c7695c10a675
parentAllow BitField's to be passed as number strings. Pretty sure it fixes #722 (diff)
downloadserver-18c6d11fc1a148cf0c494b1475ae7c653688eee5.tar.xz
Rename limits_rate_disabled -> limits_rate_enabled and remove limits_guilds_hideOfflineMember
-rw-r--r--src/api/middlewares/RateLimit.ts4
-rw-r--r--src/util/config/types/subconfigurations/limits/GuildLimits.ts1
-rw-r--r--src/util/config/types/subconfigurations/limits/RateLimits.ts2
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