slash Command
fun slashCommand(name: String, scope: CommandScope = defaultScope, function: KFunction<Any>?, builder: TopLevelSlashCommandBuilder.() -> Unit)(source)
Declares the supplied function as a slash command.
See the Discord docs on which paths are allowed.
Requirements
The declaring class must be annotated with @Command.
First parameter must be GlobalSlashEvent for global commands, or, GuildSlashEvent for global guild-only and guild commands.
See also
@Command
@JDASlashCommand