twilight_validate::request

Function auto_moderation_exempt_channels

source
pub const fn auto_moderation_exempt_channels(
    channels: &[Id<ChannelMarker>],
) -> Result<(), ValidationError>
Expand description

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

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

ยงErrors

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