pub enum ApiValidationErrorCode {
Show 228 variants
AccentColorChangedTooManyTimes,
AccountAlreadyVerified,
AfkChannelMustBeInGuild,
AfkChannelMustBeVoice,
AllChannelsMustBelongToGuild,
AnimatedAvatarsRequirePremium,
AnimatedGuildBannerRequiresFeature,
AtLeastOneEntryIsRequired,
AtLeastOneRecipientRequired,
AttachmentFieldsRequired,
AttachmentIdNotFoundInMessage,
AttachmentIdsMustBeValidIntegers,
AttachmentMetadataWithoutFiles,
AttachmentMustBeImage,
AttachmentsMetadataRequiredWhenUploading,
AttachmentsNotAllowedForMessage,
AvatarChangedTooManyTimes,
BannerChangedTooManyTimes,
BannersRequirePremium,
Base64LengthInvalid,
BioChangedTooManyTimes,
BucketIsRequired,
CannotAddYourselfToGroupDm,
CannotDeleteMoreThan100Messages,
CannotDmYourself,
CannotLeaveGuildAsOwner,
CannotPositionChannelRelativeToItself,
CannotPreloadMoreThan100Channels,
CannotReferenceAttachmentsWithoutAttachments,
CannotReorderEveryoneRole,
CannotReplyToSystemMessage,
CannotSetHoistForEveryoneRole,
CannotSpecifyBothBeforeAndAfter,
CannotUseSameRoleAsPreceding,
CategoriesCannotHaveParentChannel,
CategoriesCannotHaveParents,
ChangingDiscriminatorRequiresPremium,
ChannelDoesNotExist,
ChannelIdIsRequired,
ChannelMustBeDmOrGroupDm,
ChannelMustBeVoice,
ChannelNameEmptyAfterNormalization,
ChannelNotFound,
ColorValueTooHigh,
ColorValueTooLow,
ContentExceedsMaxLength,
ContextChannelOrGuildIdRequired,
CustomEmojiNotFound,
CustomEmojisRequirePremiumOutsideSource,
CustomStickerNotFound,
CustomStickersInDmsRequirePremium,
CustomStickersRequirePremiumOutsideSource,
DiscriminatorInvalidFormat,
DiscriminatorOutOfRange,
DuplicateAttachmentIdsNotAllowed,
DuplicateFileIndex,
DuplicateRecipientsNotAllowed,
VoiceMessagesAttachmentMustBeAudio,
VoiceMessagesAttachmentWaveformRequired,
VoiceMessagesAttachmentDurationRequired,
VoiceMessagesCannotHaveContent,
VoiceMessagesCannotHaveEmbeds,
VoiceMessagesCannotHaveFavoriteMemes,
VoiceMessagesCannotHaveStickers,
VoiceMessagesDurationExceedsLimit,
VoiceMessagesRequireSingleAttachment,
EmailAlreadyInUse,
EmailIsRequired,
EmailLengthInvalid,
EmailMustBeChangedViaToken,
EmailTokenExpired,
EmbedIndexOutOfBounds,
EmbedSplashRequiresFeature,
EmbedsExceedMaxCharacters,
EmojiRequiresGuildOrPackAccess,
FailedToParseMultipartFormData,
FailedToParseMultipartPayload,
FailedToUploadImage,
FavoriteMemeNameRequired,
FavoriteMemeNotFound,
FileIndexExceedsMaximum,
FileNotFoundForScanning,
FileNotFound,
FilenameEmptyAfterNormalization,
FilenameInvalidCharacters,
FilenameLengthInvalid,
FilenameMismatchForAttachment,
ForwardMessagesCannotContainContent,
ForwardReferenceRequiresChannelAndMessage,
GlobalNameCannotContainReservedTerms,
GlobalNameLengthInvalid,
GlobalNameReservedValue,
GuildBannerRequiresFeature,
GuildIdMustMatchReferencedMessage,
ImageSizeExceedsLimit,
IntegerOutOfInt64Range,
SnowflakeOutOfRange,
InvalidAuditLogReason,
InvalidBase64Format,
InvalidChannelId,
InvalidChannel,
InvalidCode,
InvalidDateOfBirthFormat,
InvalidDatetimeForScheduledSend,
InvalidEmailAddress,
InvalidEmailFormat,
InvalidEmailLocalPart,
InvalidEmailOrPassword,
InvalidEmailToken,
InvalidFileFieldName,
InvalidFormat,
InvalidImageData,
InvalidImageFormat,
InvalidIntegerFormat,
InvalidSnowflakeFormat,
InvalidIsoTimestamp,
InvalidJobId,
InvalidJsonInPayloadJson,
InvalidMessageData,
InvalidMfaCode,
InvalidOrAlreadyUsedBetaCode,
InvalidOrExpiredAuthorizationTicket,
InvalidOrExpiredAuthorizationToken,
InvalidOrExpiredResetToken,
InvalidOrExpiredRevertToken,
InvalidOrExpiredTicket,
InvalidOrExpiredVerificationToken,
InvalidOrRestrictedRtcRegion,
InvalidParentChannel,
InvalidPassword,
InvalidProofToken,
InvalidRoleId,
InvalidRtcRegion,
InvalidScheduledMessagePayload,
InvalidSnowflake,
InvalidTimeoutValue,
InvalidTimezoneIdentifier,
InvalidUrlFormat,
InvalidUrlOrAttachmentFormat,
InvalidVerificationCode,
InviteSplashRequiresFeature,
JobIdIsRequired,
JobIsAlreadyProcessed,
JobNotFound,
MediaAlreadyInFavoriteMemes,
MessageIdsCannotBeEmpty,
MessagesArrayRequiredAndNotEmpty,
MessagesWithSnapshotsCannotBeEdited,
MultipleFilesForIndexNotAllowed,
MustAgreeToTosAndPrivacyPolicy,
MustBeMinimumAge,
MustEnable2faBeforeRequiringForMods,
MustHaveEmailToChangeIt,
MustStartSessionBeforeSending,
NameEmptyAfterNormalization,
NewEmailMustBeDifferent,
NoFileForAttachmentMetadata,
NoFileForAttachment,
NoMetadataForFile,
NoNewEmailRequested,
NoOriginalEmailOnRecord,
NoValidMediaInMessage,
NotAValidUnicodeEmoji,
OriginalEmailAlreadyVerified,
OriginalEmailMustBeVerifiedFirst,
OriginalVerificationNotRequired,
ParentChannelNotInGuild,
ParentMustBeCategory,
ParseAndUsersOrRolesCannotBeUsedTogether,
PasswordIsTooCommon,
PasswordLengthInvalid,
PasswordNotSet,
PayloadJsonRequiredForMultipart,
PhoneNumberInvalidFormat,
PrecedingChannelMustShareParent,
PrecedingChannelNotInGuild,
PrecedingRoleNotInGuild,
PremiumRequiredForCustomEmoji,
PronounsChangedTooManyTimes,
RecipientIdsCannotBeEmpty,
RecipientIdsMustBeStrings,
RecipientIdsMustBeValidSnowflakes,
ReferencedAttachmentNotFound,
RowsIsRequired,
ScheduledMessagesMax30Days,
ScheduledTimeMustBeFuture,
SessionTimeout,
SizeBytesMustBeValidInteger,
StringLengthExact,
StringLengthInvalid,
SystemChannelMustBeInGuild,
SystemChannelMustBeText,
TagAlreadyTaken,
ThisVanityUrlIsAlreadyTaken,
TicketAlreadyCompleted,
TimeoutCannotExceed365Days,
TooManyEmbeds,
TooManyFiles,
TooManyUsersWithThisUsername,
TooManyUsersWithUsernameTryDifferent,
UnclaimedAccountsCanOnlySetEmailViaToken,
UnknownImageFormat,
UnresolvedAttachmentUrl,
UploadedAttachmentNotFound,
UrlLengthInvalid,
UserDoesNotHaveAnEmailAddress,
UserIsNotBanned,
UserIsNotPendingVerification,
UserMustBeABotToBeMarkedAsASystemUser,
UserNotInChannel,
UsernameCannotContainReservedTerms,
UsernameChangedTooManyTimes,
UsernameInvalidCharacters,
UsernameLengthInvalid,
UsernameReservedValue,
ValueMustBeIntegerInRange,
ValueTooSmall,
VanityUrlCodeAlreadyTaken,
VanityUrlCodeCannotContainFluxer,
VanityUrlCodeLengthInvalid,
VanityUrlInvalidCharacters,
VanityUrlRequiresFeature,
VerificationCodeExpired,
VerificationCodeNotIssued,
VisionaryRequiredForBotDiscriminator,
VisionaryRequiredForDiscriminator,
VoiceChannelsCannotBeAboveTextChannels,
WebhookNameLengthInvalid,
}Variants§
AccentColorChangedTooManyTimes
Accent colour has been changed too many times recently.
AccountAlreadyVerified
Account is already verified.
AfkChannelMustBeInGuild
AFK channel must be in the same guild.
AfkChannelMustBeVoice
AFK channel must be a voice channel.
AllChannelsMustBelongToGuild
All channels must belong to the same guild.
AnimatedAvatarsRequirePremium
Animated avatars require premium.
AnimatedGuildBannerRequiresFeature
Animated guild banners require the feature to be enabled.
AtLeastOneEntryIsRequired
At least one entry is required.
AtLeastOneRecipientRequired
At least one recipient is required.
AttachmentFieldsRequired
Attachment fields are required.
AttachmentIdNotFoundInMessage
Attachment ID was not found in the message.
AttachmentIdsMustBeValidIntegers
Attachment IDs must be valid integers.
AttachmentMetadataWithoutFiles
Attachment metadata provided without files.
AttachmentMustBeImage
Attachment must be an image.
AttachmentsMetadataRequiredWhenUploading
Attachments metadata is required when uploading files.
AttachmentsNotAllowedForMessage
Attachments are not allowed for this message type.
AvatarChangedTooManyTimes
Avatar has been changed too many times recently.
BannerChangedTooManyTimes
Banner has been changed too many times recently.
BannersRequirePremium
Banners require premium.
Base64LengthInvalid
Invalid base64 length.
BioChangedTooManyTimes
Bio has been changed too many times recently.
BucketIsRequired
Bucket is required.
CannotAddYourselfToGroupDm
Cannot add yourself to a group DM.
CannotDeleteMoreThan100Messages
Cannot delete more than 100 messages at once.
CannotDmYourself
Cannot send a direct message to yourself.
CannotLeaveGuildAsOwner
Cannot leave guild as the owner.
CannotPositionChannelRelativeToItself
Cannot position channel relative to itself.
CannotPreloadMoreThan100Channels
Cannot preload more than 100 channels.
CannotReferenceAttachmentsWithoutAttachments
Cannot reference attachments without providing attachments.
CannotReorderEveryoneRole
Cannot reorder the everyone role.
CannotReplyToSystemMessage
Cannot reply to a system message.
CannotSetHoistForEveryoneRole
Cannot set hoist for the everyone role.
CannotSpecifyBothBeforeAndAfter
Cannot specify both before and after parameters.
CannotUseSameRoleAsPreceding
Cannot use the same role as preceding.
CategoriesCannotHaveParentChannel
Categories cannot have a parent channel.
CategoriesCannotHaveParents
Categories cannot have parents.
ChangingDiscriminatorRequiresPremium
Changing discriminator requires premium.
ChannelDoesNotExist
Channel does not exist.
ChannelIdIsRequired
Channel ID is required.
ChannelMustBeDmOrGroupDm
Channel must be a DM or group DM.
ChannelMustBeVoice
Channel must be a voice channel.
ChannelNameEmptyAfterNormalization
Channel name is empty after normalisation.
ChannelNotFound
Channel was not found.
ColorValueTooHigh
Colour value is too high.
ColorValueTooLow
Colour value is too low.
ContentExceedsMaxLength
Content exceeds maximum length.
ContextChannelOrGuildIdRequired
Context channel or guild ID is required.
CustomEmojiNotFound
Custom emoji was not found.
CustomEmojisRequirePremiumOutsideSource
Custom emojis require premium when used outside their source.
CustomStickerNotFound
Custom sticker was not found.
CustomStickersInDmsRequirePremium
Custom stickers in DMs require premium.
CustomStickersRequirePremiumOutsideSource
Custom stickers require premium when used outside their source.
DiscriminatorInvalidFormat
Discriminator has an invalid format.
DiscriminatorOutOfRange
Discriminator is out of valid range.
DuplicateAttachmentIdsNotAllowed
Duplicate attachment IDs are not allowed.
DuplicateFileIndex
Duplicate file index.
DuplicateRecipientsNotAllowed
Duplicate recipients are not allowed.
VoiceMessagesAttachmentMustBeAudio
Voice message attachment must be audio.
VoiceMessagesAttachmentWaveformRequired
Voice message attachment waveform is required.
VoiceMessagesAttachmentDurationRequired
Voice message attachment duration is required.
VoiceMessagesCannotHaveContent
Voice messages cannot have content.
VoiceMessagesCannotHaveEmbeds
Voice messages cannot have embeds.
VoiceMessagesCannotHaveFavoriteMemes
Voice messages cannot have favourite memes.
VoiceMessagesCannotHaveStickers
Voice messages cannot have stickers.
VoiceMessagesDurationExceedsLimit
Voice message duration exceeds limit.
VoiceMessagesRequireSingleAttachment
Voice messages require a single attachment.
EmailAlreadyInUse
Email address is already in use.
EmailIsRequired
Email address is required.
EmailLengthInvalid
Email address length is invalid.
EmailMustBeChangedViaToken
Email must be changed via verification token.
EmailTokenExpired
Email verification token has expired.
EmbedIndexOutOfBounds
Embed index is out of bounds.
EmbedSplashRequiresFeature
Embed splash requires the feature to be enabled.
EmbedsExceedMaxCharacters
Embeds exceed maximum character count.
EmojiRequiresGuildOrPackAccess
Emoji requires guild or pack access.
FailedToParseMultipartFormData
Failed to parse multipart form data.
FailedToParseMultipartPayload
Failed to parse multipart payload.
FailedToUploadImage
Failed to upload image.
FavoriteMemeNameRequired
Favourite meme name is required.
FavoriteMemeNotFound
Favourite meme was not found.
FileIndexExceedsMaximum
File index exceeds maximum.
FileNotFoundForScanning
File not found for scanning.
FileNotFound
File was not found.
FilenameEmptyAfterNormalization
Filename is empty after normalisation.
FilenameInvalidCharacters
Filename contains invalid characters.
FilenameLengthInvalid
Filename length is invalid.
FilenameMismatchForAttachment
Filename mismatch for attachment.
ForwardMessagesCannotContainContent
Forward messages cannot contain content.
ForwardReferenceRequiresChannelAndMessage
Forward reference requires channel and message.
GlobalNameCannotContainReservedTerms
Display name cannot contain reserved terms.
GlobalNameLengthInvalid
Display name length is invalid.
GlobalNameReservedValue
Display name is a reserved value.
GuildBannerRequiresFeature
Guild banner requires the feature to be enabled.
GuildIdMustMatchReferencedMessage
Guild ID must match referenced message.
ImageSizeExceedsLimit
Image size exceeds limit.
IntegerOutOfInt64Range
Integer is out of 64-bit range.
SnowflakeOutOfRange
Snowflake is out of valid range.
InvalidAuditLogReason
Invalid audit log reason.
InvalidBase64Format
Invalid base64 format.
InvalidChannelId
Invalid channel ID.
InvalidChannel
Invalid channel.
InvalidCode
Invalid code.
InvalidDateOfBirthFormat
Invalid date of birth format.
InvalidDatetimeForScheduledSend
Invalid datetime for scheduled send.
InvalidEmailAddress
Invalid email address.
InvalidEmailFormat
Invalid email format.
InvalidEmailLocalPart
Invalid email local part.
InvalidEmailOrPassword
Invalid email or password.
InvalidEmailToken
Invalid email verification token.
InvalidFileFieldName
Invalid file field name.
InvalidFormat
Invalid format.
InvalidImageData
Invalid image data.
InvalidImageFormat
Invalid image format.
InvalidIntegerFormat
Invalid integer format.
InvalidSnowflakeFormat
Invalid snowflake format.
InvalidIsoTimestamp
Invalid ISO timestamp.
InvalidJobId
Invalid job ID.
InvalidJsonInPayloadJson
Invalid JSON in payload_json field.
InvalidMessageData
Invalid message data.
InvalidMfaCode
Invalid MFA code.
InvalidOrAlreadyUsedBetaCode
Invalid or already used beta code.
InvalidOrExpiredAuthorizationTicket
Invalid or expired authorisation ticket.
InvalidOrExpiredAuthorizationToken
Invalid or expired authorisation token.
InvalidOrExpiredResetToken
Invalid or expired password reset token.
InvalidOrExpiredRevertToken
Invalid or expired revert token.
InvalidOrExpiredTicket
Invalid or expired ticket.
InvalidOrExpiredVerificationToken
Invalid or expired verification token.
InvalidOrRestrictedRtcRegion
Invalid or restricted RTC region.
InvalidParentChannel
Invalid parent channel.
InvalidPassword
Invalid password.
InvalidProofToken
Invalid proof token.
InvalidRoleId
Invalid role ID.
InvalidRtcRegion
Invalid RTC region.
InvalidScheduledMessagePayload
Invalid scheduled message payload.
InvalidSnowflake
Invalid snowflake.
InvalidTimeoutValue
Invalid timeout value.
InvalidTimezoneIdentifier
Invalid timezone identifier.
InvalidUrlFormat
Invalid URL format.
InvalidUrlOrAttachmentFormat
Invalid URL or attachment format.
InvalidVerificationCode
Invalid verification code.
InviteSplashRequiresFeature
Invite splash requires the feature to be enabled.
JobIdIsRequired
Job ID is required.
JobIsAlreadyProcessed
Job has already been processed.
JobNotFound
Job was not found.
MediaAlreadyInFavoriteMemes
Media is already in favourite memes.
MessageIdsCannotBeEmpty
Message IDs cannot be empty.
MessagesArrayRequiredAndNotEmpty
Messages array is required and cannot be empty.
MessagesWithSnapshotsCannotBeEdited
Messages with snapshots cannot be edited.
MultipleFilesForIndexNotAllowed
Multiple files for the same index are not allowed.
MustAgreeToTosAndPrivacyPolicy
Must agree to terms of service and privacy policy.
MustBeMinimumAge
Must be minimum age to use this service.
MustEnable2faBeforeRequiringForMods
Must enable 2FA before requiring it for moderators.
MustHaveEmailToChangeIt
Must have an email to change it.
MustStartSessionBeforeSending
Must start session before sending.
NameEmptyAfterNormalization
Name is empty after normalisation.
NewEmailMustBeDifferent
New email must be different from current email.
NoFileForAttachmentMetadata
No file provided for attachment metadata.
NoFileForAttachment
No file provided for attachment.
NoMetadataForFile
No metadata provided for file.
NoNewEmailRequested
No new email has been requested.
NoOriginalEmailOnRecord
No original email on record.
NoValidMediaInMessage
No valid media in message.
NotAValidUnicodeEmoji
Not a valid Unicode emoji.
OriginalEmailAlreadyVerified
Original email is already verified.
OriginalEmailMustBeVerifiedFirst
Original email must be verified first.
OriginalVerificationNotRequired
Original verification is not required.
ParentChannelNotInGuild
Parent channel is not in the guild.
ParentMustBeCategory
Parent channel must be a category.
ParseAndUsersOrRolesCannotBeUsedTogether
Parse and users/roles cannot be used together.
PasswordIsTooCommon
Password is too common.
PasswordLengthInvalid
Password length is invalid.
PasswordNotSet
Password is not set.
PayloadJsonRequiredForMultipart
payload_json is required for multipart requests.
PhoneNumberInvalidFormat
Phone number has an invalid format.
Preceding channel must share the same parent.
PrecedingChannelNotInGuild
Preceding channel is not in the guild.
PrecedingRoleNotInGuild
Preceding role is not in the guild.
PremiumRequiredForCustomEmoji
Premium is required for custom emoji.
PronounsChangedTooManyTimes
Pronouns have been changed too many times recently.
RecipientIdsCannotBeEmpty
Recipient IDs cannot be empty.
RecipientIdsMustBeStrings
Recipient IDs must be strings.
RecipientIdsMustBeValidSnowflakes
Recipient IDs must be valid snowflakes.
ReferencedAttachmentNotFound
Referenced attachment was not found.
RowsIsRequired
Rows field is required.
ScheduledMessagesMax30Days
Scheduled messages must be within 30 days.
ScheduledTimeMustBeFuture
Scheduled time must be in the future.
SessionTimeout
Session has timed out.
SizeBytesMustBeValidInteger
Size in bytes must be a valid integer.
StringLengthExact
String must be exactly the required length.
StringLengthInvalid
String length is invalid.
SystemChannelMustBeInGuild
System channel must be in the guild.
SystemChannelMustBeText
System channel must be a text channel.
TagAlreadyTaken
Tag is already taken.
ThisVanityUrlIsAlreadyTaken
This vanity URL is already taken.
TicketAlreadyCompleted
Ticket has already been completed.
TimeoutCannotExceed365Days
Timeout cannot exceed 365 days.
TooManyEmbeds
Too many embeds.
TooManyFiles
Too many files.
TooManyUsersWithThisUsername
Too many users with this username.
TooManyUsersWithUsernameTryDifferent
Too many users with this username, try a different one.
UnclaimedAccountsCanOnlySetEmailViaToken
Unclaimed accounts can only set email via verification token.
UnknownImageFormat
Unknown image format.
UnresolvedAttachmentUrl
Unresolved attachment URL.
UploadedAttachmentNotFound
Uploaded attachment was not found.
UrlLengthInvalid
URL length is invalid.
UserDoesNotHaveAnEmailAddress
User does not have an email address.
UserIsNotBanned
User is not banned.
UserIsNotPendingVerification
User is not pending verification.
UserMustBeABotToBeMarkedAsASystemUser
User must be a bot to be marked as a system user.
UserNotInChannel
User is not in the channel.
UsernameCannotContainReservedTerms
Username cannot contain reserved terms.
UsernameChangedTooManyTimes
Username has been changed too many times recently.
UsernameInvalidCharacters
Username contains invalid characters.
UsernameLengthInvalid
Username length is invalid.
UsernameReservedValue
Username is a reserved value.
ValueMustBeIntegerInRange
Value must be an integer in the valid range.
ValueTooSmall
Value is too small.
VanityUrlCodeAlreadyTaken
Vanity URL code is already taken.
VanityUrlCodeCannotContainFluxer
Vanity URL code cannot contain fluxer.
VanityUrlCodeLengthInvalid
Vanity URL code length is invalid.
VanityUrlInvalidCharacters
Vanity URL contains invalid characters.
VanityUrlRequiresFeature
Vanity URL requires the feature to be enabled.
VerificationCodeExpired
Verification code has expired.
VerificationCodeNotIssued
Verification code was not issued.
VisionaryRequiredForBotDiscriminator
Visionary subscription required for bot discriminator.
VisionaryRequiredForDiscriminator
Visionary subscription required for discriminator.
VoiceChannelsCannotBeAboveTextChannels
Voice channels cannot be positioned above text channels.
WebhookNameLengthInvalid
Webhook name length is invalid.
Trait Implementations§
Source§impl Clone for ApiValidationErrorCode
impl Clone for ApiValidationErrorCode
Source§fn clone(&self) -> ApiValidationErrorCode
fn clone(&self) -> ApiValidationErrorCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more