variation
abstract fun variation(function: KFunction<Any>, block: TextCommandVariationBuilder.() -> Unit = {})(source)
Adds a variation to this text command.
Text command variations
A given text command path (such as ban temp
) is composed of at least one variation; Each variation has different parameters, and will display separately in the built-in help content.
Each variation runs based off insertion order, the first variation that has a full match against the user input gets executed.
If no regex-based variation (using a BaseCommandEvent) matches, the fallback variation is executed (if a variation using CommandEvent exists).
If no variation matches and there is no fallback, then the help content is invoked for the command.