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 seconds (
2_419_200
this is equivalent to28
days) to disable communication for. - Maximum amount of exempt channels for the auto moderation rule.
- Maximum amount of exempt roles for the auto moderation rule.
- Maximum length of a allowed keyword.
- Maximum amount of allowed keywords when using the custom keywords.
- Maximum length of a keyword in the keyword filter.
- Maximum amount of keywords allowed in the keyword filter.
- Maximum amount of mentions that triggers an auto moderation action.
- Maximum length of a keyword preset keyword.
- Maximum amount of allowed keywords when using a keyword preset.
- Maximum length of a regex pattern.
- Maximum amount of regex patterns that trigger the auto moderation.
- 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 entitlements to get.
- Minimum amount of entitlements 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 the
duration_seconds
field for an auto moderation action metadata is correct. - Ensure that an auto moderation block action’s
custom_message
is correct. - Ensure that the
exempt_channels
field for an auto moderation rule is correct. - Ensure that the
exempt_roles
field for an auto moderation rule is correct. - Ensure that an auto moderation rule’s
allow_list
is correct. - Ensure that an auto moderation rule’s
allow_list
item is correct. - Ensure that an auto moderation rule’s
keyword_filter
is correct. - Ensure that an auto moderation rule’s
keyword_filter
item is correct. - Ensure that an auto moderation rule’s
mention_total_limit
is correct. - Ensure that an auto moderation rule’s
allow_list
is correct when using presets. - Ensure that an auto moderation rule’s
allow_list
item is correct when using presets. - Ensure that an auto moderation rule’s
regex_patterns
is correct. - Ensure that an auto moderation rule’s
regex_patterns
item 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 Entitlements endpoint 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.