IdentifyRateLimiter

A rate limiter that follows Discord's rate limits for Gateways when identifying.

The additional requirements for multiple shards are also taken into account.

Properties

Link copied to clipboard
abstract val maxConcurrency: Int

The number of Identify requests allowed per 5 seconds.

Functions

Link copied to clipboard
abstract suspend fun consume(shardId: Int, events: SharedFlow<Event>)

Suspends until the Gateway with the given shardId is allowed to Identify.