Package-level declarations

Types

Link copied to clipboard
@Target(allowedTargets = [])
annotation class Bandwidth(val capacity: Long, val refill: Refill)

Represents one of the limits of a rate limit bucket.

Link copied to clipboard
annotation class BotPermissions(val permissions: Permission = [], val append: Boolean = false)

Sets the required bot permissions to use this text / application command.

Link copied to clipboard
annotation class Command

Enables this class to be scanned for one or more commands.
This is a specialization of @BService for commands.

Link copied to clipboard
annotation class Cooldown(val cooldown: Long = 0, val unit: ChronoUnit = ChronoUnit.MILLIS, val rateLimitScope: RateLimitScope = RateLimitScope.USER, val deleteOnRefill: Boolean = true)

Add a simple rate limit-based cooldown of this text / application command and components.

Link copied to clipboard
annotation class Filter(val classes: KClass<out Filter>)

References an interaction filtering service.

Link copied to clipboard
annotation class GeneratedOption

Marks a parameter as being a generated option.

Link copied to clipboard
annotation class Optional

Marks an option (@SlashOption or @TextOption) as being optional.

Link copied to clipboard
annotation class RateLimit(val scope: RateLimitScope, val deleteOnRefill: Boolean = true, val bandwidths: Bandwidth)

Defines a rate limit for a command / component handler.

Link copied to clipboard
annotation class RateLimitReference(val group: String)

Uses an existing rate limiter for this command / component handler.

Link copied to clipboard
@Target(allowedTargets = [])
annotation class Refill(val type: RefillType, val tokens: Long, val period: Long, val periodUnit: ChronoUnit)

Defines how the tokens are refilled on each bandwidth.

Link copied to clipboard

Refill type of bandwidths.

Link copied to clipboard
annotation class UserPermissions(val permissions: Permission = [], val append: Boolean = false)

Sets the required user permissions to use this text / application command.

Link copied to clipboard
annotation class VarArgs(val value: Int, val numRequired: Int = 1)

Generates N command options from the specified @SlashOption or @TextOption.