All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.freya022.botcommands.api.commands.ratelimit.CancellableRateLimit.kt Maven / Gradle / Ivy

Go to download

A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.

There is a newer version: 3.0.0-alpha.18
Show newest version
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()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy