pub fn name(value: impl AsRef<str>) -> Result<(), CommandValidationError>
Expand description
Validate the name of a User
or Message
command.
The length of the name must be more than NAME_LENGTH_MIN
and less than
or equal to NAME_LENGTH_MAX
.
Use chat_input_name
to validate name of a ChatInput
command.
ยงErrors
Returns an error of type NameLengthInvalid
if the name is invalid.