Cmd Chain Scope
Scope used to append the continuation of one argument chain. Nested scopes share the same backing element list.
Functions
Link copied to clipboard
fun <T : Any> argument(name: String, type: ArgumentType<T>, suggests: SuggestionProvider<ClientCommandSource>? = null, block: CmdChainScope.ArgContinuation<T>)
Appends a required argument and passes its typed handle into the continuation.
Link copied to clipboard
Declares the executable leaf of this chain.
Link copied to clipboard
fun execSuspend(allowParallel: Boolean = false, handler: KAsyncCommand.Handler<ClientCommandSource>)
Declares a suspending executable leaf of this chain.
Link copied to clipboard
fun <T : Any> optional(name: String, type: ArgumentType<T>, default: T, suggests: SuggestionProvider<ClientCommandSource>? = null, block: CmdChainScope.ArgContinuation<T>)
Appends an optional argument with a non-null default.
fun <T : Any> optional(name: String, type: ArgumentType<T>, default: Nothing? = null, suggests: SuggestionProvider<ClientCommandSource>? = null, block: CmdChainScope.ArgContinuation<T?>)
Appends an optional argument. Omitted values are resolved from the declared default; all following arguments must also be optional.
Link copied to clipboard