mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-05 18:32:33 +01:00
Rename limits_rate_disabled -> limits_rate_enabled and remove limits_guilds_hideOfflineMember
This commit is contained in:
parent
bf5f936aec
commit
ec1c340369
@ -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);
|
||||
|
@ -4,5 +4,4 @@ export class GuildLimits {
|
||||
maxMembers: number = 25000000;
|
||||
maxChannels: number = 65535;
|
||||
maxChannelsInCategory: number = 65535;
|
||||
hideOfflineMember: number = 3;
|
||||
}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user