SlashCommand

interface SlashCommand<in C : SlashCommandContext> : ApplicationCommand<C>

Functions

execute
Link copied to clipboard
abstract suspend fun C.execute()

Called when this command is used in an interaction

Properties

request
Link copied to clipboard
abstract val request: ApplicationCommandRequest

The discord-json request body to be sent to the Discord API

Inheritors

GlobalSlashCommand
Link copied to clipboard
GlobalGuildSlashCommand
Link copied to clipboard
GuildSlashCommand
Link copied to clipboard

Extensions

applicationCommandRequest
Link copied to clipboard
fun SlashCommand<*>.applicationCommandRequest(name: String, desc: String, block: ApplicationCommandBuilder.() -> Unit = {}): ApplicationCommandRequest

DSL for building ApplicationCommandRequest for slash commands

Sources

jvm source
Link copied to clipboard