summary refs log tree commit diff
path: root/api/src/middlewares/RateLimit.ts
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/middlewares/RateLimit.ts')
-rw-r--r--api/src/middlewares/RateLimit.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/middlewares/RateLimit.ts b/api/src/middlewares/RateLimit.ts
index d1fd072f..1a38cfcf 100644
--- a/api/src/middlewares/RateLimit.ts
+++ b/api/src/middlewares/RateLimit.ts
@@ -107,7 +107,8 @@ export default function rateLimit(opts: {
 }
 
 export async function initRateLimits(app: Router) {
-	const { routes, global, ip, error } = Config.get().limits.rate;
+	const { routes, global, ip, error, disabled } = Config.get().limits.rate;
+	if (disabled) return;
 	await listenEvent(EventRateLimit, (event) => {
 		Cache.set(event.channel_id as string, event.data);
 		event.acknowledge?.();