1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 02:42:37 +01:00

Rename limits_rate_disabled -> limits_rate_enabled and remove limits_guilds_hideOfflineMember

This commit is contained in:
Madeline 2022-12-22 21:01:29 +11:00
parent bf5f936aec
commit ec1c340369
3 changed files with 3 additions and 4 deletions

View File

@ -143,8 +143,8 @@ export default function rateLimit(opts: {
} }
export async function initRateLimits(app: Router) { export async function initRateLimits(app: Router) {
const { routes, global, ip, error, disabled } = Config.get().limits.rate; const { routes, global, ip, error, enabled } = Config.get().limits.rate;
if (disabled) return; if (!enabled) return;
console.log("Enabling rate limits..."); console.log("Enabling rate limits...");
await listenEvent(EventRateLimit, (event) => { await listenEvent(EventRateLimit, (event) => {
Cache.set(event.channel_id as string, event.data); Cache.set(event.channel_id as string, event.data);

View File

@ -4,5 +4,4 @@ export class GuildLimits {
maxMembers: number = 25000000; maxMembers: number = 25000000;
maxChannels: number = 65535; maxChannels: number = 65535;
maxChannelsInCategory: number = 65535; maxChannelsInCategory: number = 65535;
hideOfflineMember: number = 3;
} }

View File

@ -1,7 +1,7 @@
import { RouteRateLimit, RateLimitOptions } from "."; import { RouteRateLimit, RateLimitOptions } from ".";
export class RateLimits { export class RateLimits {
disabled: boolean = true; enabled: boolean = false;
ip: Omit<RateLimitOptions, "bot_count"> = { ip: Omit<RateLimitOptions, "bot_count"> = {
count: 500, count: 500,
window: 5 window: 5