optional

fun <T : Any> optional(name: String, type: ArgumentType<T>, default: Nothing? = null, suggests: SuggestionProvider<ClientCommandSource>? = null, block: CmdChainScope.ArgContinuation<T?>)

Declares a nullable optional argument and passes its typed handle into the continuation.


fun <T : Any> optional(name: String, type: ArgumentType<T>, default: T, suggests: SuggestionProvider<ClientCommandSource>? = null, block: CmdChainScope.ArgContinuation<T>)

Declares an optional argument with a non-null default and typed handle.