twilight_validate::request

Function auto_moderation_exempt_roles

source
pub const fn auto_moderation_exempt_roles(
    roles: &[Id<RoleMarker>],
) -> Result<(), ValidationError>
Expand description

Ensure that the exempt_roles field for an auto moderation rule is correct.

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

ยงErrors

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