TextSubcommandBuilder

Properties

Link copied to clipboard
abstract var aliases: MutableList<String>

Secondary paths of the command, must not contain any spaces, and must follow the same format as slash commands such as name group subcommand

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 var description: String?

Short description of the command, displayed in the description of the built-in help command.

Link copied to clipboard

Returns a detailed embed of what the command is, it is used by the internal help command

Link copied to clipboard
abstract var hidden: Boolean

Hides a command and its subcommands from help content and execution, except for bot owners.

Link copied to clipboard
abstract val name: String

The name of this command.

Link copied to clipboard
abstract var nsfw: Boolean

Marks a text command as being usable in NSFW channels only.

Link copied to clipboard
abstract var ownerRequired: Boolean

Marks this text command as only usable by the bot owners.

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.

Link copied to clipboard
abstract fun subcommand(name: String, block: TextCommandBuilder.() -> Unit)
Link copied to clipboard
abstract fun variation(function: KFunction<Any>, block: TextCommandVariationBuilder.() -> Unit = {})

Adds a variation to this text command.