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
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
builder Modifier
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
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
component Builder
command component builder for the flag
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