slashCommand

fun slashCommand(name: String, function: KFunction<Any>?, builder: TopLevelSlashCommandBuilder.() -> Unit)(source)

Declares the supplied function as a slash command. For subcommands and subcommand groups, use ofSubcommands instead.

See the Discord docs on which paths are allowed.

The default allowed interaction contexts and integration types can be redefined in the corresponding command manager.

Requirements

The first parameter must be:

See also

@JDASlashCommand