1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 04:32:35 +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 4591de5805
commit 18c6d11fc1
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
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) {
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);

View File

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

View File

@ -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