twilight_validate::request

Function auto_moderation_block_action_custom_message_limit

source
pub fn auto_moderation_block_action_custom_message_limit(
    custom_message: impl AsRef<str>,
) -> Result<(), ValidationError>
Expand description

Ensure that an auto moderation block action’s custom_message is correct.

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

§Errors

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