slashCommand

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

Declares the supplied function as a slash command.

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