Skip to main content

neptunium_http/error/
validation_error_code.rs

1use serde::Deserialize;
2
3#[derive(Deserialize, Copy, Clone, Debug, PartialEq, Eq)]
4#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
5pub enum ApiValidationErrorCode {
6    /// Accent colour has been changed too many times recently.
7    AccentColorChangedTooManyTimes,
8    /// Account is already verified.
9    AccountAlreadyVerified,
10    /// AFK channel must be in the same guild.
11    AfkChannelMustBeInGuild,
12    /// AFK channel must be a voice channel.
13    AfkChannelMustBeVoice,
14    /// All channels must belong to the same guild.
15    AllChannelsMustBelongToGuild,
16    /// Animated avatars require premium.
17    AnimatedAvatarsRequirePremium,
18    /// Animated guild banners require the feature to be enabled.
19    AnimatedGuildBannerRequiresFeature,
20    /// At least one entry is required.
21    AtLeastOneEntryIsRequired,
22    /// At least one recipient is required.
23    AtLeastOneRecipientRequired,
24    /// Attachment fields are required.
25    AttachmentFieldsRequired,
26    /// Attachment ID was not found in the message.
27    AttachmentIdNotFoundInMessage,
28    /// Attachment IDs must be valid integers.
29    AttachmentIdsMustBeValidIntegers,
30    /// Attachment metadata provided without files.
31    AttachmentMetadataWithoutFiles,
32    /// Attachment must be an image.
33    AttachmentMustBeImage,
34    /// Attachments metadata is required when uploading files.
35    AttachmentsMetadataRequiredWhenUploading,
36    /// Attachments are not allowed for this message type.
37    AttachmentsNotAllowedForMessage,
38    /// Avatar has been changed too many times recently.
39    AvatarChangedTooManyTimes,
40    /// Banner has been changed too many times recently.
41    BannerChangedTooManyTimes,
42    /// Banners require premium.
43    BannersRequirePremium,
44    /// Invalid base64 length.
45    Base64LengthInvalid,
46    /// Bio has been changed too many times recently.
47    BioChangedTooManyTimes,
48    /// Bucket is required.
49    BucketIsRequired,
50    /// Cannot add yourself to a group DM.
51    CannotAddYourselfToGroupDm,
52    /// Cannot delete more than 100 messages at once.
53    #[serde(rename = "CANNOT_DELETE_MORE_THAN_100_MESSAGES")]
54    CannotDeleteMoreThan100Messages,
55    /// Cannot send a direct message to yourself.
56    CannotDmYourself,
57    /// Cannot leave guild as the owner.
58    CannotLeaveGuildAsOwner,
59    /// Cannot position channel relative to itself.
60    CannotPositionChannelRelativeToItself,
61    /// Cannot preload more than 100 channels.
62    #[serde(rename = "CANNOT_PRELOAD_MORE_THAN_100_CHANNELS")]
63    CannotPreloadMoreThan100Channels,
64    /// Cannot reference attachments without providing attachments.
65    CannotReferenceAttachmentsWithoutAttachments,
66    /// Cannot reorder the everyone role.
67    CannotReorderEveryoneRole,
68    /// Cannot reply to a system message.
69    CannotReplyToSystemMessage,
70    /// Cannot set hoist for the everyone role.
71    CannotSetHoistForEveryoneRole,
72    /// Cannot specify both before and after parameters.
73    CannotSpecifyBothBeforeAndAfter,
74    /// Cannot use the same role as preceding.
75    CannotUseSameRoleAsPreceding,
76    /// Categories cannot have a parent channel.
77    CategoriesCannotHaveParentChannel,
78    /// Categories cannot have parents.
79    CategoriesCannotHaveParents,
80    /// Changing discriminator requires premium.
81    ChangingDiscriminatorRequiresPremium,
82    /// Channel does not exist.
83    ChannelDoesNotExist,
84    /// Channel ID is required.
85    ChannelIdIsRequired,
86    /// Channel must be a DM or group DM.
87    ChannelMustBeDmOrGroupDm,
88    /// Channel must be a voice channel.
89    ChannelMustBeVoice,
90    /// Channel name is empty after normalisation.
91    ChannelNameEmptyAfterNormalization,
92    /// Channel was not found.
93    ChannelNotFound,
94    /// Colour value is too high.
95    ColorValueTooHigh,
96    /// Colour value is too low.
97    ColorValueTooLow,
98    /// Content exceeds maximum length.
99    ContentExceedsMaxLength,
100    /// Context channel or guild ID is required.
101    ContextChannelOrGuildIdRequired,
102    /// Custom emoji was not found.
103    CustomEmojiNotFound,
104    /// Custom emojis require premium when used outside their source.
105    CustomEmojisRequirePremiumOutsideSource,
106    /// Custom sticker was not found.
107    CustomStickerNotFound,
108    /// Custom stickers in DMs require premium.
109    CustomStickersInDmsRequirePremium,
110    /// Custom stickers require premium when used outside their source.
111    CustomStickersRequirePremiumOutsideSource,
112    /// Discriminator has an invalid format.
113    DiscriminatorInvalidFormat,
114    /// Discriminator is out of valid range.
115    DiscriminatorOutOfRange,
116    /// Duplicate attachment IDs are not allowed.
117    DuplicateAttachmentIdsNotAllowed,
118    /// Duplicate file index.
119    DuplicateFileIndex,
120    /// Duplicate recipients are not allowed.
121    DuplicateRecipientsNotAllowed,
122    /// Voice message attachment must be audio.
123    VoiceMessagesAttachmentMustBeAudio,
124    /// Voice message attachment waveform is required.
125    VoiceMessagesAttachmentWaveformRequired,
126    /// Voice message attachment duration is required.
127    VoiceMessagesAttachmentDurationRequired,
128    /// Voice messages cannot have content.
129    VoiceMessagesCannotHaveContent,
130    /// Voice messages cannot have embeds.
131    VoiceMessagesCannotHaveEmbeds,
132    /// Voice messages cannot have favourite memes.
133    VoiceMessagesCannotHaveFavoriteMemes,
134    /// Voice messages cannot have stickers.
135    VoiceMessagesCannotHaveStickers,
136    /// Voice message duration exceeds limit.
137    VoiceMessagesDurationExceedsLimit,
138    /// Voice messages require a single attachment.
139    VoiceMessagesRequireSingleAttachment,
140    /// Email address is already in use.
141    EmailAlreadyInUse,
142    /// Email address is required.
143    EmailIsRequired,
144    /// Email address length is invalid.
145    EmailLengthInvalid,
146    /// Email must be changed via verification token.
147    EmailMustBeChangedViaToken,
148    /// Email verification token has expired.
149    EmailTokenExpired,
150    /// Embed index is out of bounds.
151    EmbedIndexOutOfBounds,
152    /// Embed splash requires the feature to be enabled.
153    EmbedSplashRequiresFeature,
154    /// Embeds exceed maximum character count.
155    EmbedsExceedMaxCharacters,
156    /// Emoji requires guild or pack access.
157    EmojiRequiresGuildOrPackAccess,
158    /// Failed to parse multipart form data.
159    FailedToParseMultipartFormData,
160    /// Failed to parse multipart payload.
161    FailedToParseMultipartPayload,
162    /// Failed to upload image.
163    FailedToUploadImage,
164    /// Favourite meme name is required.
165    FavoriteMemeNameRequired,
166    /// Favourite meme was not found.
167    FavoriteMemeNotFound,
168    /// File index exceeds maximum.
169    FileIndexExceedsMaximum,
170    /// File not found for scanning.
171    FileNotFoundForScanning,
172    /// File was not found.
173    FileNotFound,
174    /// Filename is empty after normalisation.
175    FilenameEmptyAfterNormalization,
176    /// Filename contains invalid characters.
177    FilenameInvalidCharacters,
178    /// Filename length is invalid.
179    FilenameLengthInvalid,
180    /// Filename mismatch for attachment.
181    FilenameMismatchForAttachment,
182    /// Forward messages cannot contain content.
183    ForwardMessagesCannotContainContent,
184    /// Forward reference requires channel and message.
185    ForwardReferenceRequiresChannelAndMessage,
186    /// Display name cannot contain reserved terms.
187    GlobalNameCannotContainReservedTerms,
188    /// Display name length is invalid.
189    GlobalNameLengthInvalid,
190    /// Display name is a reserved value.
191    GlobalNameReservedValue,
192    /// Guild banner requires the feature to be enabled.
193    GuildBannerRequiresFeature,
194    /// Guild ID must match referenced message.
195    GuildIdMustMatchReferencedMessage,
196    /// Image size exceeds limit.
197    ImageSizeExceedsLimit,
198    /// Integer is out of 64-bit range.
199    IntegerOutOfInt64Range,
200    /// Snowflake is out of valid range.
201    SnowflakeOutOfRange,
202    /// Invalid audit log reason.
203    InvalidAuditLogReason,
204    /// Invalid base64 format.
205    InvalidBase64Format,
206    /// Invalid channel ID.
207    InvalidChannelId,
208    /// Invalid channel.
209    InvalidChannel,
210    /// Invalid code.
211    InvalidCode,
212    /// Invalid date of birth format.
213    InvalidDateOfBirthFormat,
214    /// Invalid datetime for scheduled send.
215    InvalidDatetimeForScheduledSend,
216    /// Invalid email address.
217    InvalidEmailAddress,
218    /// Invalid email format.
219    InvalidEmailFormat,
220    /// Invalid email local part.
221    InvalidEmailLocalPart,
222    /// Invalid email or password.
223    InvalidEmailOrPassword,
224    /// Invalid email verification token.
225    InvalidEmailToken,
226    /// Invalid file field name.
227    InvalidFileFieldName,
228    /// Invalid format.
229    InvalidFormat,
230    /// Invalid image data.
231    InvalidImageData,
232    /// Invalid image format.
233    InvalidImageFormat,
234    /// Invalid integer format.
235    InvalidIntegerFormat,
236    /// Invalid snowflake format.
237    InvalidSnowflakeFormat,
238    /// Invalid ISO timestamp.
239    InvalidIsoTimestamp,
240    /// Invalid job ID.
241    InvalidJobId,
242    /// Invalid JSON in `payload_json` field.
243    InvalidJsonInPayloadJson,
244    /// Invalid message data.
245    InvalidMessageData,
246    /// Invalid MFA code.
247    InvalidMfaCode,
248    /// Invalid or already used beta code.
249    InvalidOrAlreadyUsedBetaCode,
250    /// Invalid or expired authorisation ticket.
251    InvalidOrExpiredAuthorizationTicket,
252    /// Invalid or expired authorisation token.
253    InvalidOrExpiredAuthorizationToken,
254    /// Invalid or expired password reset token.
255    InvalidOrExpiredResetToken,
256    /// Invalid or expired revert token.
257    InvalidOrExpiredRevertToken,
258    /// Invalid or expired ticket.
259    InvalidOrExpiredTicket,
260    /// Invalid or expired verification token.
261    InvalidOrExpiredVerificationToken,
262    /// Invalid or restricted RTC region.
263    InvalidOrRestrictedRtcRegion,
264    /// Invalid parent channel.
265    InvalidParentChannel,
266    /// Invalid password.
267    InvalidPassword,
268    /// Invalid proof token.
269    InvalidProofToken,
270    /// Invalid role ID.
271    InvalidRoleId,
272    /// Invalid RTC region.
273    InvalidRtcRegion,
274    /// Invalid scheduled message payload.
275    InvalidScheduledMessagePayload,
276    /// Invalid snowflake.
277    InvalidSnowflake,
278    /// Invalid timeout value.
279    InvalidTimeoutValue,
280    /// Invalid timezone identifier.
281    InvalidTimezoneIdentifier,
282    /// Invalid URL format.
283    InvalidUrlFormat,
284    /// Invalid URL or attachment format.
285    InvalidUrlOrAttachmentFormat,
286    /// Invalid verification code.
287    InvalidVerificationCode,
288    /// Invite splash requires the feature to be enabled.
289    InviteSplashRequiresFeature,
290    /// Job ID is required.
291    JobIdIsRequired,
292    /// Job has already been processed.
293    JobIsAlreadyProcessed,
294    /// Job was not found.
295    JobNotFound,
296    /// Media is already in favourite memes.
297    MediaAlreadyInFavoriteMemes,
298    /// Message IDs cannot be empty.
299    MessageIdsCannotBeEmpty,
300    /// Messages array is required and cannot be empty.
301    MessagesArrayRequiredAndNotEmpty,
302    /// Messages with snapshots cannot be edited.
303    MessagesWithSnapshotsCannotBeEdited,
304    /// Multiple files for the same index are not allowed.
305    MultipleFilesForIndexNotAllowed,
306    /// Must agree to terms of service and privacy policy.
307    MustAgreeToTosAndPrivacyPolicy,
308    /// Must be minimum age to use this service.
309    MustBeMinimumAge,
310    /// Must enable 2FA before requiring it for moderators.
311    #[serde(rename = "MUST_ENABLE_2FA_BEFORE_REQUIRING_FOR_MODS")]
312    MustEnable2faBeforeRequiringForMods,
313    /// Must have an email to change it.
314    MustHaveEmailToChangeIt,
315    /// Must start session before sending.
316    MustStartSessionBeforeSending,
317    /// Name is empty after normalisation.
318    NameEmptyAfterNormalization,
319    /// New email must be different from current email.
320    NewEmailMustBeDifferent,
321    /// No file provided for attachment metadata.
322    NoFileForAttachmentMetadata,
323    /// No file provided for attachment.
324    NoFileForAttachment,
325    /// No metadata provided for file.
326    NoMetadataForFile,
327    /// No new email has been requested.
328    NoNewEmailRequested,
329    /// No original email on record.
330    NoOriginalEmailOnRecord,
331    /// No valid media in message.
332    NoValidMediaInMessage,
333    /// Not a valid Unicode emoji.
334    NotAValidUnicodeEmoji,
335    /// Original email is already verified.
336    OriginalEmailAlreadyVerified,
337    /// Original email must be verified first.
338    OriginalEmailMustBeVerifiedFirst,
339    /// Original verification is not required.
340    OriginalVerificationNotRequired,
341    /// Parent channel is not in the guild.
342    ParentChannelNotInGuild,
343    /// Parent channel must be a category.
344    ParentMustBeCategory,
345    /// Parse and users/roles cannot be used together.
346    ParseAndUsersOrRolesCannotBeUsedTogether,
347    /// Password is too common.
348    PasswordIsTooCommon,
349    /// Password length is invalid.
350    PasswordLengthInvalid,
351    /// Password is not set.
352    PasswordNotSet,
353    /// `payload_json` is required for multipart requests.
354    PayloadJsonRequiredForMultipart,
355    /// Phone number has an invalid format.
356    PhoneNumberInvalidFormat,
357    /// Preceding channel must share the same parent.
358    PrecedingChannelMustShareParent,
359    /// Preceding channel is not in the guild.
360    PrecedingChannelNotInGuild,
361    /// Preceding role is not in the guild.
362    PrecedingRoleNotInGuild,
363    /// Premium is required for custom emoji.
364    PremiumRequiredForCustomEmoji,
365    /// Pronouns have been changed too many times recently.
366    PronounsChangedTooManyTimes,
367    /// Recipient IDs cannot be empty.
368    RecipientIdsCannotBeEmpty,
369    /// Recipient IDs must be strings.
370    RecipientIdsMustBeStrings,
371    /// Recipient IDs must be valid snowflakes.
372    RecipientIdsMustBeValidSnowflakes,
373    /// Referenced attachment was not found.
374    ReferencedAttachmentNotFound,
375    /// Rows field is required.
376    RowsIsRequired,
377    /// Scheduled messages must be within 30 days.
378    #[serde(rename = "SCHEDULED_MESSAGES_MAX_30_DAYS")]
379    ScheduledMessagesMax30Days,
380    /// Scheduled time must be in the future.
381    ScheduledTimeMustBeFuture,
382    /// Session has timed out.
383    SessionTimeout,
384    /// Size in bytes must be a valid integer.
385    SizeBytesMustBeValidInteger,
386    /// String must be exactly the required length.
387    StringLengthExact,
388    /// String length is invalid.
389    StringLengthInvalid,
390    /// System channel must be in the guild.
391    SystemChannelMustBeInGuild,
392    /// System channel must be a text channel.
393    SystemChannelMustBeText,
394    /// Tag is already taken.
395    TagAlreadyTaken,
396    /// This vanity URL is already taken.
397    ThisVanityUrlIsAlreadyTaken,
398    /// Ticket has already been completed.
399    TicketAlreadyCompleted,
400    /// Timeout cannot exceed 365 days.
401    #[serde(rename = "TIMEOUT_CANNOT_EXCEED_365_DAYS")]
402    TimeoutCannotExceed365Days,
403    /// Too many embeds.
404    TooManyEmbeds,
405    /// Too many files.
406    TooManyFiles,
407    /// Too many users with this username.
408    TooManyUsersWithThisUsername,
409    /// Too many users with this username, try a different one.
410    TooManyUsersWithUsernameTryDifferent,
411    /// Unclaimed accounts can only set email via verification token.
412    UnclaimedAccountsCanOnlySetEmailViaToken,
413    /// Unknown image format.
414    UnknownImageFormat,
415    /// Unresolved attachment URL.
416    UnresolvedAttachmentUrl,
417    /// Uploaded attachment was not found.
418    UploadedAttachmentNotFound,
419    /// URL length is invalid.
420    UrlLengthInvalid,
421    /// User does not have an email address.
422    UserDoesNotHaveAnEmailAddress,
423    /// User is not banned.
424    UserIsNotBanned,
425    /// User is not pending verification.
426    UserIsNotPendingVerification,
427    /// User must be a bot to be marked as a system user.
428    UserMustBeABotToBeMarkedAsASystemUser,
429    /// User is not in the channel.
430    UserNotInChannel,
431    /// Username cannot contain reserved terms.
432    UsernameCannotContainReservedTerms,
433    /// Username has been changed too many times recently.
434    UsernameChangedTooManyTimes,
435    /// Username contains invalid characters.
436    UsernameInvalidCharacters,
437    /// Username length is invalid.
438    UsernameLengthInvalid,
439    /// Username is a reserved value.
440    UsernameReservedValue,
441    /// Value must be an integer in the valid range.
442    ValueMustBeIntegerInRange,
443    /// Value is too small.
444    ValueTooSmall,
445    /// Vanity URL code is already taken.
446    VanityUrlCodeAlreadyTaken,
447    /// Vanity URL code cannot contain fluxer.
448    VanityUrlCodeCannotContainFluxer,
449    /// Vanity URL code length is invalid.
450    VanityUrlCodeLengthInvalid,
451    /// Vanity URL contains invalid characters.
452    VanityUrlInvalidCharacters,
453    /// Vanity URL requires the feature to be enabled.
454    VanityUrlRequiresFeature,
455    /// Verification code has expired.
456    VerificationCodeExpired,
457    /// Verification code was not issued.
458    VerificationCodeNotIssued,
459    /// Visionary subscription required for bot discriminator.
460    VisionaryRequiredForBotDiscriminator,
461    /// Visionary subscription required for discriminator.
462    VisionaryRequiredForDiscriminator,
463    /// Voice channels cannot be positioned above text channels.
464    VoiceChannelsCannotBeAboveTextChannels,
465    /// Webhook name length is invalid.
466    WebhookNameLengthInvalid,
467}