twilight_validate::request

Function audit_reason

Source
pub fn audit_reason(
    audit_reason: impl AsRef<str>,
) -> Result<(), ValidationError>
Expand description

Ensure that an audit reason is correct.

The length must be at most AUDIT_REASON_MAX. This is based on this documentation entry.

ยงErrors

Returns an error of type AuditReason if the length is invalid.