JDATextCommandVariation

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class JDATextCommandVariation(val path: Array<out String>, val order: Int = 0, val description: String = "", val usage: String = "", val example: String = "")(source)

Declares this function as a text command, additional properties can be set with @TextCommandData.

Additional annotations

Additional data can be set by using @TextCommandData once per top-level name, by specifying their target path.

Text command variations

A given text command path (such as ban temp) is composed of at least one variation; Each variation has different parameters, and will display separately in the built-in help content.

Each variation runs based off its priority, the first variation that has a full match against the user input gets executed.

If no regex-based variation (using a BaseCommandEvent) matches, the fallback variation is executed (if a variation using CommandEvent exists).

If no variation matches and there is no fallback, then the help content is invoked for the command.

Requirements

Option types

See also

@Command

@TextCommandData

@Category

@TextOption

@Hidden

@NSFW

@BotPermissions

@UserPermissions

@Cooldown

@RateLimit

@Filter

Declaring text commands using the DSL

Properties

Link copied to clipboard

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

Link copied to clipboard

Example command for this command variation, the built-in help command already sets the prefix and command name, with a space at the end.

Link copied to clipboard
val order: Int = 0

Specifies the priority of this text command variation (1 is the most important).

Link copied to clipboard
val path: Array<out String>

Path components of the command, limited to three components and composed of a-zA-Z1-9_-

Link copied to clipboard

Usage string for this command variation, the built-in help command already sets the prefix and command name, with a space at the end.