Package dev. inmo. tgbotapi. bot. settings. limiters
Types
Common Limiter
Link copied to clipboard
class CommonLimiter(lockCount: Int, regenTime: MilliSeconds, scope: CoroutineScope) : RequestLimiter
Content copied to clipboard
Exceptions Only Limiter
Link copied to clipboard
class ExceptionsOnlyLimiter(defaultTooManyRequestsDelay: MilliSeconds) : RequestLimiter
Content copied to clipboard
This limiter will limit requests only after getting a RetryAfterError or ClientRequestException with HttpStatusCode.TooManyRequests status code. Important thing is that in case if some of block has been blocked, all the others will wait until it will be possible to be called
Pow Limiter
Link copied to clipboard
data class PowLimiter(minAwaitTime: MilliSeconds, maxAwaitTime: MilliSeconds, powValue: Double, powK: Double, scope: CoroutineScope) : RequestLimiter
Content copied to clipboard
Request Limiter
Link copied to clipboard
interface RequestLimiter
Content copied to clipboard