CommanderCommandCreationContext

Context for creating a command

Since

0.1.0

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

The action of the command

Link copied to clipboard

The aliases of the command

Link copied to clipboard

The arguments of the command

Link copied to clipboard

The subcommands of the command

Link copied to clipboard

The description of the command

Link copied to clipboard
lateinit var name: String

The name of the command

Link copied to clipboard

The options of the command

Functions

Link copied to clipboard

Add an action to the command

Link copied to clipboard
fun alias(vararg aliases: String)

Add an alias to the command

Link copied to clipboard
fun argument(cliArgument: CommanderArgument)
fun argument(name: String, description: String? = null, required: Boolean = false, defaultValue: String? = null, valueName: String? = null, valueDescription: String? = null, valueValidator: CommanderValueValidator? = null)

Add an argument to the command

Link copied to clipboard
fun description(description: String)

Add description to the command

Link copied to clipboard

Generate the command

Link copied to clipboard
fun option(cliOption: CommanderOption)
fun option(name: String, aliases: Array<String> = arrayOf(), shortAliases: Array<String> = arrayOf(), description: String? = null, required: Boolean = false, hasValue: Boolean = false, defaultValue: String? = null, valueName: String? = null, valueDescription: String? = null, valueValidator: CommanderValueValidator? = null)

Add an option to the command

Link copied to clipboard
fun subcommand(cliCommand: CommanderCommand)
fun subcommand(name: String, aliases: Array<String> = arrayOf(), description: String? = null, action: CommanderCommandAction? = null, init: CommanderCommandInit? = null)

Add a subcommand to the command