twilight_validate::command

Function description

source
pub fn description(value: impl AsRef<str>) -> Result<(), CommandValidationError>
Expand description

Validate the description of a Command.

The length of the description must be more than DESCRIPTION_LENGTH_MIN and less than or equal to DESCRIPTION_LENGTH_MAX.

ยงErrors

Returns an error of type DescriptionInvalid if the description is invalid.