option

abstract fun option(declaredName: String, optionName: String = declaredName.toDiscordString(), block: SlashCommandOptionBuilder.() -> Unit = {})(source)

Declares an input option.

The designated parameter's type must be supported by a SlashParameterResolver.

Parameters

declaredName

Name of the declared parameter which receives the value

optionName

Name of the option on Discord, transforms the declared name uppercase characters with underscore + lowercase by default