twilight_validate::request

Function get_channel_messages_limit

source
pub const fn get_channel_messages_limit(
    limit: u16,
) -> Result<(), ValidationError>
Expand description

Ensure that the limit for the Get Channel Messages request is correct.

The limit must be at least GET_CHANNEL_MESSAGES_LIMIT_MIN and at most GET_CHANNEL_MESSAGES_LIMIT_MAX. This is based on this documentation entry.

ยงErrors

Returns an error of type GetChannelMessages if the limit is invalid.