runs
infix inline fun runs(crossinline block: CommandContext<Source>.() -> Unit): CommandBuilder<Source, Builder, Node>(source)
Adds execution logic to this command. The place where this function is called matters, as this defines for which path in the command tree this executor should be called.
possible usage:
command("mycommand") {
// defining runs in the body:
runs { }
// calling runs as an infix function directly after literal or argument:
literal("subcommand") runs { }
}
Content copied to clipboard
Note that this function will always return 1 as the exit code.
See also
ArgumentBuilder.executes