twilight_validate::request

Function auto_moderation_action_metadata_duration_seconds

source
pub const fn auto_moderation_action_metadata_duration_seconds(
    seconds: u32,
) -> Result<(), ValidationError>
Expand description

Ensure that the duration_seconds field for an auto moderation action metadata is correct.

The duration must be at most AUTO_MODERATION_ACTION_METADATA_DURATION_SECONDS_MAX. This is based on this documentation entry.

ยงErrors

Returns an error of type AutoModerationActionMetadataDurationSeconds if the duration is invalid.