Properties

Link copied to clipboard

The permissions required for the bot to run this command.

Link copied to clipboard
abstract val context: BContext

The main context.

Link copied to clipboard
abstract override var declarationSite: DeclarationSite

Purely for debugging purposes, will be shown in exceptions.

Link copied to clipboard
abstract val name: String

The name of this command.

Link copied to clipboard

The parent of this command, null for top-level commands.

Link copied to clipboard
abstract val path: CommandPath

The complete path that leads to this command.

Link copied to clipboard

The permissions required for the caller to use this command.

Functions

Link copied to clipboard
fun CommandBuilder.cooldown(duration: Duration, scope: RateLimitScope = RateLimitScope.USER, deleteOnRefill: Boolean = true, block: RateLimitBuilder.() -> Unit = {})

Sets an anonymous rate limit-based cooldown on this command. This cooldown cannot be referenced anywhere else as it is not registered.

Link copied to clipboard
abstract fun rateLimit(bucketFactory: BucketFactory, limiterFactory: RateLimiterFactory = RateLimiter.defaultFactory(RateLimitScope.USER), block: RateLimitBuilder.() -> Unit = {})

Sets an anonymous rate limiter on this command. This rate limiter cannot be referenced anywhere else as it is not registered.

Link copied to clipboard
abstract fun rateLimitReference(group: String)

Sets the rate limiter of this command to one declared by a RateLimitProvider.