Default Rate Limiter
class DefaultRateLimiter(val scope: RateLimitScope, bucketFactory: BucketFactory, deleteOnRefill: Boolean = true) : RateLimiter, RateLimitHandler, BucketAccessor(source)
Default RateLimiter implementation, based on DefaultRateLimitHandler and DefaultBucketAccessor.
Note: The rate limit message won't be deleted in a private channel, or if the refill delay is longer than 10 minutes.
Parameters
scope
Scope of the rate limit, see RateLimitScope values.
delete On Refill
Whether the rate limit message should be deleted after the refill delay.
See also
Functions
Link copied to clipboard
open suspend override fun getBucket(context: BContext, event: GenericComponentInteractionCreateEvent): Bucket
open suspend override fun getBucket(context: BContext, event: GenericCommandInteractionEvent, commandInfo: ApplicationCommandInfo): Bucket
open suspend override fun getBucket(context: BContext, event: MessageReceivedEvent, commandInfo: TextCommandInfo): Bucket
Link copied to clipboard
open suspend override fun <T : GenericComponentInteractionCreateEvent, IReplyCallback, IMessageEditCallback> onRateLimit(context: BContext, event: T, probe: ConsumptionProbe)
open suspend override fun <T : GenericCommandInteractionEvent, IReplyCallback> onRateLimit(context: BContext, event: T, commandInfo: ApplicationCommandInfo, probe: ConsumptionProbe)
open suspend override fun onRateLimit(context: BContext, event: MessageReceivedEvent, commandInfo: TextCommandInfo, probe: ConsumptionProbe)