JDASlashCommand

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class JDASlashCommand(val name: String, val group: String = "", val subcommand: String = "", val description: String = "")(source)

Declares this function as a slash command, additional properties can be set with @TopLevelSlashCommandData and @SlashCommandGroupData.

See the Discord docs on which paths are allowed.

Additional annotations

Additional data can be set once per subcommand group with @SlashCommandGroupData.

Requirements

Option types

See also

@Command

@TopLevelSlashCommandData

@SlashCommandGroupData

@SlashOption

@UserPermissions

@BotPermissions

@Cooldown

@RateLimit

@Filter

Declaring global application commands using the DSL

Declaring guild application commands using the DSL

Properties

Link copied to clipboard

Short description of the command displayed on Discord.

Link copied to clipboard

Command group of this command, must not contain any spaces and no upper cases.

Link copied to clipboard

The top-level name of the command, must not contain any spaces and no upper cases.

Link copied to clipboard

Subcommand name of this command, must not contain any spaces and no upper cases.