RateLimitManager

abstract class RateLimitManager(source)

Allows programmatic declaration of autocomplete handlers using AutocompleteHandlerProvider.

See also

Properties

Link copied to clipboard
abstract val context: BContext

Functions

Link copied to clipboard
fun cooldown(group: String, duration: Duration, scope: RateLimitScope = RateLimitScope.USER, deleteOnRefill: Boolean = true, block: ReceiverConsumer<RateLimitBuilder> = ReceiverConsumer.noop()): RateLimitInfo

Creates a rate limit-based cooldown.

Link copied to clipboard
fun RateLimitManager.cooldown(group: String, duration: Duration, scope: RateLimitScope = RateLimitScope.USER, deleteOnRefill: Boolean = true, block: ReceiverConsumer<RateLimitBuilder> = ReceiverConsumer.noop()): RateLimitInfo

Creates a rate limit-based cooldown.

Link copied to clipboard
fun rateLimit(group: String, bucketFactory: BucketFactory, limiterFactory: RateLimiterFactory = RateLimiter.defaultFactory(RateLimitScope.USER), block: ReceiverConsumer<RateLimitBuilder> = ReceiverConsumer.noop()): RateLimitInfo

Creates a rate limiter with the specified group.