option

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

Declares an input option.

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

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