io.github.freya022.botcommands.api.commands.ratelimit.CancellableRateLimit.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BotCommands Show documentation
Show all versions of BotCommands Show documentation
A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.
package io.github.freya022.botcommands.api.commands.ratelimit
/**
* Allows cancellation of rate limits by refilling tokens, usually delegated on events.
*/
interface CancellableRateLimit {
val isRateLimitCancelled: Boolean
/**
* Cancels the token consumption of the current rate limited interaction.
*
* Canceling more than once is a no-op, canceling on a full bucket is also a no-op.
*/
fun cancelRateLimit()
}