inlineClassOption

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

Declares an input option encapsulated in an inline class.

Supported types can be found in ParameterResolver, additional types can be added by implementing TextParameterResolver.

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> TextOptionRegistry.inlineClassOption(declaredName: String, optionName: String? = null, noinline block: TextCommandOptionBuilder.() -> Unit = {})(source)

Declares an input option encapsulated in an inline class.

Supported types can be found in ParameterResolver, additional types can be added by implementing TextParameterResolver.

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