InteractionOptions
class InteractionOptions(commandInteraction: ApplicationCommandInteraction)
Content copied to clipboard
An experimental class for getting command options through property delegation.
Example:
val name: String by options
val count: Int by options
val enabled: Boolean by options
val user: Mono<User> by options
val channel: Mono<Channel> by options
val role: Mono<Role> by options
// also
val nullableName: String? by options.nullable()
val defaultName: String by options.defaultValue("test")Content copied to clipboard
Constructors
InteractionOptions
Link copied to clipboard
fun InteractionOptions(commandInteraction: ApplicationCommandInteraction)
Content copied to clipboard
Types
DefaultValueOptionDelegate
Link copied to clipboard
inner class DefaultValueOptionDelegate<T>(value: T) : ReadOnlyProperty<Any?, T>
Content copied to clipboard
NullableOptionDelegate
Link copied to clipboard
Functions
defaultValue
Link copied to clipboard
fun <T> defaultValue(value: T): InteractionOptions.DefaultValueOptionDelegate<T>
Content copied to clipboard
nullable
Link copied to clipboard
Sources
jvm source
Link copied to clipboard