inlineClassOption

fun SlashOptionRegistry.inlineClassOption(declaredName: String, optionName: String? = null, clazz: KClass<*>, block: SlashCommandOptionBuilder.() -> Unit = {})(source)

Declares an input option encapsulated in an inline class.

The object contained by the inline class must be supported by a SlashParameterResolver.

Parameters

declaredName

Name of the declared parameter which receives the value class

optionName

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

clazz

The inline class type


inline fun <T : Any> SlashOptionRegistry.inlineClassOption(declaredName: String, optionName: String? = null, noinline block: SlashCommandOptionBuilder.() -> Unit = {})(source)

Declares an input option encapsulated in an inline class.

The object contained by the inline class must be supported by a SlashParameterResolver.

Parameters

declaredName

Name of the declared parameter which receives the value class

optionName

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

T

The inline class type