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

Set of filters preventing this command from executing.

Link copied to clipboard
abstract var isDefaultLocked: Boolean

Specifies whether the application command is disabled for everyone but administrators by default, so that administrators can further configure the command.

Link copied to clipboard
abstract val name: String

The name of this command.

Link copied to clipboard
abstract var nsfw: Boolean

Specifies whether the application command is usable in NSFW channels.

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
abstract val scope: CommandScope
Link copied to clipboard
Link copied to clipboard

The permissions required for the caller to use this command.

Functions

Link copied to clipboard
abstract fun aggregate(declaredName: String, aggregator: KFunction<*>, block: T.() -> Unit = {})

Declares multiple options aggregated in a single parameter.

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 customOption(declaredName: String)

Declares a custom option, such as an TextLocalizationContext (with @LocalizationBundle).

Link copied to clipboard

Convenience extension to load an ApplicationCommandFilter service.

Link copied to clipboard
abstract fun generatedOption(declaredName: String, generatedValueSupplier: ApplicationGeneratedValueSupplier)

Declares a generated option, the supplier gets called on each command execution.

Link copied to clipboard
fun <T : OptionAggregateBuilder<T>> OptionAggregateBuilderContainer<T>.inlineClassAggregate(declaredName: String, clazz: KClass<*>, block: T.(valueName: String) -> Unit = {})
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.

Link copied to clipboard
abstract fun serviceOption(declaredName: String)

Declares a service option, allowing injection of services, which must be available.