import { Cache } from '@klasa/cache'; import { RateLimit } from './RateLimit'; export declare class RateLimitManager extends Cache> { #private; /** * The amount of milliseconds for the ratelimits from this manager to expire. */ time: number; /** * The amount of times a RateLimit can drip before it's limited. */ limit: number; /** * @param limit The amount of times a RateLimit can drip before it's limited. * @param time The amount of milliseconds for the ratelimits from this manager to expire. */ constructor(time: number, limit?: number); /** * Gets a RateLimit from this manager or creates it if it does not exist. * @param id The id for the RateLimit */ acquire(id: K): RateLimit; /** * Creates a RateLimit for this manager. * @param id The id the RateLimit belongs to */ create(id: K): RateLimit; /** * Wraps Collection's set method to set interval to sweep inactive RateLimits. * @param id The id the RateLimit belongs to * @param ratelimit The RateLimit to set */ set(id: K, ratelimit: RateLimit): this; /** * Wraps Collection's sweep method to clear the interval when this manager is empty. * @param fn The filter function * @param thisArg The this for the sweep */ sweep(fn?: (value: RateLimit, key: K, collection: this) => boolean, thisArg?: any): number; static get [Symbol.species](): typeof Cache; }