JDAMessageCommand

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

Declares this function as a message context command.

See the Discord docs for more details.

Requirements

Option types

See also

GlobalMessageEvent.getTarget

@Command

@ContextOption

@UserPermissions

@BotPermissions

@Cooldown

@RateLimit

@Filter

Declaring global application commands using the DSL

Declaring guild application commands using the DSL

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

Primary name of the command, which can contain spaces and upper cases.

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.