ProxyBucketAccessor

class ProxyBucketAccessor<K>(proxyManager: ProxyManager<K>, keySupplier: BucketKeySupplier<K>, configurationSupplier: BucketConfigurationSupplier) : BucketAccessor(source)

BucketAccessor implementation with a ProxyManager to retrieve buckets, and a key made using keySupplier.

Parameters

proxyManager

Scope of the rate limit, see RateLimitScope values.

keySupplier

Supplies the key to create/retrieve a bucket using the proxyManager

configurationSupplier

A supplier of BucketConfiguration, describing the rate limits

Constructors

Link copied to clipboard
constructor(proxyManager: ProxyManager<K>, keySupplier: BucketKeySupplier<K>, configurationSupplier: BucketConfigurationSupplier)

Functions

Link copied to clipboard
open suspend override fun getBucket(context: BContext, event: GenericCommandInteractionEvent, commandInfo: ApplicationCommandInfo): Bucket
open suspend override fun getBucket(context: BContext, event: GenericComponentInteractionCreateEvent, rateLimitReference: ComponentRateLimitReference): Bucket
open suspend override fun getBucket(context: BContext, event: MessageReceivedEvent, commandInfo: TextCommandInfo): Bucket