Module twilight_validate::request
source · Expand description
Contains all other input validation functions.
These functions are generally not related to a specific Discord model.
Structs
- A field is not valid.
Enums
- Type of
ValidationError
that occurred.
Constants
- The maximum audit log reason length in UTF-16 codepoints.
- Maximum length of an auto moderation block action’s custom message.
- Maximum amount of mentions that triggers an auto moderation action.
- Maximum amount of time a member can be timed out for.
- Maximum amount of seconds (
604_800
this is equivalent to7
days) for messages to be deleted upon ban. - Maximum amount of messages to get.
- Minimum amount of messages to get.
- Maximum amount of guilds to get.
- Minimum amount of guilds to get.
- Maximum amount of audit log entries to list.
- Minimum amount of audit log entries to list.
- Maximum amount of guild bans to list.
- Maximum amount of guild members to list.
- Minimum amount of guild members to list.
- Minimum amount of users to return when getting reactions.
- Maximum amount of users to return when getting reactions.
- Maximum length of a guild’s name.
- Minimum length of a guild’s name.
- Maximum amount of days to prune users from a guild.
- Minimum amount of days to prune users from a guild.
- Maximum length of an invite’s age, in seconds.
- Maximum uses of an invite, if not unlimited.
- Maximum length of a maximum.
- Minimum length of a nickname.
- Maximum length of a scheduled event’s description.
- Minimum length of a scheduled event’s description.
- Maximum amount of scheduled event users to get.
- Minimum amount of scheduled event users to get.
- Maximum length of a scheduled event’s name.
- Minimum length of a scheduled event’s name.
- Maximum amount of guild members to search for.
- Minimum amount of guild members to search for.
- Maximum stage instance topic length.
- Minimum stage instance topic length.
- Maximum length of a guild template description.
- Maximum length of a guild template name.
- Minimum length of a guild template name.
- Maximum length of a username.
- Minimum length of a username.
- Maximum length of a webhook username.
- Minimum length of a webhook username.
Functions
- Ensure that an audit reason is correct.
- Ensure that an auto moderation block action’s
custom_message
is correct. - Ensure that an auto moderation rule’s
mention_total_limit
is correct. - Validate that a timeout time is not too far in the future.
- Ensure that the delete message seconds amount for the Create Guild Ban request is correct.
- Ensure that the limit for the Get Channel Messages request is correct.
- Ensure that the limit for the Get Current User Guilds request is correct.
- Ensure that the limit for the Get Guild Audit Log endpoint is correct.
- Ensure that the limit for the Get Guild Bans endpoint is correct.
- Ensure that the limit for the Get Guild Members endpoint is correct.
- Ensure that the limit for the Get Reactions endpoint is correct.
- Ensure that a guild name’s length is correct.
- Ensure that the days to prune members from a guild is correct.
- Ensure that the invite max age is correct.
- Ensure that the invite max uses is correct.
- Ensure that the nickname length is correct.
- Ensure that a scheduled event’s description is correct.
- Ensure that a scheduled event’s get users limit amount is correct.
- Ensure that a scheduled event’s name is correct.
- Ensure that the limit for the Search Guild Members endpoint is correct.
- Ensure that the stage instance’s topic length is correct.
- Ensure that a guild template’s description length is correct.
- Ensure that a guild template’s name length is correct.
- Ensure that a username is correct.
- Ensure that a webhook is correct.