required

fun required(component: CommandComponent.Builder<C, *>): MutableCommandBuilder<C>

Adds a new component to this command

Return

this mutable builder

Parameters

component

component to add


fun <T> required(name: String, parser: ParserDescriptor<C, T>, mutator: CommandComponent.Builder<C, T>.() -> Unit = {}): MutableCommandBuilder<C>
fun <T> required(name: CloudKey<T>, parser: ParserDescriptor<C, T>, mutator: CommandComponent.Builder<C, T>.() -> Unit = {}): MutableCommandBuilder<C>

Adds a new component to this command

Parameters

name

the name of the component

parser

the parser of the component

mutator

mutator of the component

T

the type of the component


fun <T> required(componentSupplier: () -> CommandComponent.Builder<C, T>): MutableCommandBuilder<C>

Add a new argument to this command

Return

this mutable builder

Parameters

T

value type

componentSupplier

supplier of the component