TopLevelSlashCommandData

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class TopLevelSlashCommandData(val scope: CommandScope = CommandScope.GLOBAL_NO_DM, val defaultLocked: Boolean = false, val nsfw: Boolean = false, val description: String = "")(source)

Additional annotation for top-level slash commands.

This is only used to specify properties on the top-level command of the annotated slash command, such as the scope or top-level description.

This can be specified at most once per top-level slash command, e.g., if you have /tag create and /tag edit, you can annotate at most one of them.

See also

@JDASlashCommand

Properties

Link copied to clipboard
val defaultLocked: Boolean = false

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

Short description of the command displayed on Discord.

Link copied to clipboard
val nsfw: Boolean = false

Specifies whether the application command is usable in NSFW channels.

Link copied to clipboard

Specifies the application command scope for this command.