twilight_validate::command

Function options

source
pub fn options(options: &[CommandOption]) -> Result<(), CommandValidationError>
Expand description

Validate a list of command options for count, order, and internal validity.

ยงErrors

Returns an error of type OptionsRequiredFirst if a required option is listed before an optional option.

Returns an error of type OptionsCountInvalid if the list of options or any sub-list of options is too long.