flag

fun <T> flag(name: String, aliases: Array<String> = emptyArray(), description: Description = Description.empty(), parser: ParserDescriptor<C, T>): MutableCommandBuilder<C>

Add a new flag component to this command

Return

this mutable builder

Parameters

name

name of the flag

aliases

flag aliases

description

description of the flag

parser

parser for the flag

the component value type

fun <T> flag(name: String, aliases: Array<String> = emptyArray(), description: Description = Description.empty(), builderModifier: CommandFlag.Builder<C, Void>.() -> CommandFlag.Builder<C, T>): MutableCommandBuilder<C>

Add a new flag component to this command

Return

this mutable builder

Parameters

name

name of the flag

aliases

flag aliases

description

description of the flag

builderModifier

flag builder modifier

T

the component value type


fun <T> flag(name: String, aliases: Array<String> = emptyArray(), description: Description = Description.empty(), component: TypedCommandComponent<C, T>): MutableCommandBuilder<C>

Add a new flag component to this command

Return

this mutable builder

Parameters

name

name of the flag

aliases

flag aliases

description

description of the flag

component

component for the flag

the component value type

fun <T> flag(name: String, aliases: Array<String> = emptyArray(), description: Description = Description.empty(), componentBuilder: CommandComponent.Builder<C, T>): MutableCommandBuilder<C>

Add a new flag component to this command

Return

this mutable builder

Parameters

name

name of the flag

aliases

flag aliases

description

description of the flag

componentBuilder

command component builder for the flag

the component value type

fun flag(name: String, aliases: Array<String> = emptyArray(), description: Description = Description.empty()): MutableCommandBuilder<C>

Add a new presence flag component to this command

Return

this mutable builder

Parameters

name

name of the flag

aliases

flag aliases

description

description of the flag