twilight_validate::embed

Function embed

source
pub fn embed(embed: &Embed) -> Result<(), EmbedValidationError>
Expand description

Ensure an embed is correct.

§Errors

Returns an error of type AuthorNameTooLarge if the author’s name is too large.

Returns an error of type ColorNotRgb if if the provided color is not a valid RGB integer. Refer to COLOR_MAXIMUM to know what the maximum accepted value is.

Returns an error of type DescriptionTooLarge if the description is too large.

Returns an error of type EmbedTooLarge if the embed in total is too large.

Returns an error of type FieldNameTooLarge if a field’s name is too long.

Returns an error of type FieldValueTooLarge if a field’s value is too long.

Returns an error of type FooterTextTooLarge if the footer text is too long.

Returns an error of type TitleTooLarge if the title is too long.

Returns an error of type TooManyFields if there are too many fields.