Enum twilight_http::api_error::ErrorCode [−][src]
#[non_exhaustive] pub enum ErrorCode {}Show variants
GeneralError, UnknownAccount, UnknownApplication, UnknownChannel, UnknownGuild, UnknownIntegration, UnknownInvite, UnknownMember, UnknownMessage, UnknownPermissionOverwrite, UnknownProvider, UnknownRole, UnknownToken, UnknownUser, UnknownEmoji, UnknownWebhook, UnknownWebhookService, UnknownSession, UnknownBan, UnknownSKU, UnknownStoreListing, UnknownEntitlement, UnknownBuild, UnknownLobby, UnknownBranch, UnknownStoreDirectoryLayout, UnknownRedistributable, UnknownGiftCode, UnknownGuildTemplate, UnknownInteraction, UnknownApplicationCommand, UnknownApplicationCommandPermissions, BotsCannotUseEndpoint, OnlyBotsCanUseEndpoint, ExplicitContentSendingBlocked, UnauthorizedApplicationAction, SlowModeRateLimitReached, NotAccountOwner, AnnouncementRateLimitReached, ChannelRateLimitReached, UnallowedWordsForPublicStage, MaximumGuildsReached, MaximumFriendsReached, MaximumPinsReached, MaximumRecipientsReached, MaximumRolesReached, MaximumWebhooksReached, MaximumEmojisReached, MaximumReactionsReached, MaximumGuildChannelsReached, MaximumAttachmentsReached, MaximumInvitesReached, MaximumAnimatedEmojisReached, MaximumGuildMembersReached, GuildTemplateAlreadyExist, MaximumNonGuildBansReached, MaximumGuildBansFetchesReached, Unauthorized, AccountNeedsVerification, OpeningDirectMessageRateLimitReached, RequestEntityTooLarge, FeatureTemporarilyDisabled, UserBannedFromGuild, UserNotInVoice, MessageAlreadyCrossposted, CommandNameAlreadyExists, Missingaccess, InvalidAccountType, InvalidDMChannelAction, GuildWidgetDisabled, MessageNotAuthoredByUser, EmptyMessage, CannotSendMessageToUser, CannotSendMessagesInVoiceChannel, VerificationLevelTooHigh, OAuthApplicationHasNoBot, OAuthApplicationLimitReached, InvalidOAuthSstate, PermissionsLacking, InvalidAuthenticationTokenProvided, NoteTooLong, InvalidMessageDeleteRange, MessagePinnedInWrongChannel, InviteCodeInvalidOrTaken, InvalidActionOnSystemMessage, CannotExecuteActionOnChannelType, InvalidOAuthAccessToken, MissingOAuthScope, InvalidWebhookToken, InvalidRole, InvalidRecipient, MessageTooOldToBulkDelete, InvalidFormBodyOrContentType, InviteAcceptedToGuildBotNotIn, InvalidApiVersion, CannotSelfRedeemGift, PaymentRequiredForGift, CommunityGuildRequired, InvalidStickerSent, TwoFactorRequired, NoSuchUser, ReactionBlocked, ApiResourceOverloaded, Other(u64),
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
General error (such as a malformed request body, amongst other things)
Unknown account
Unknown application
Unknown channel
Unknown guild
Unknown integration
Unknown invite
Unknown member
Unknown message
Unknown permission overwrite
Unknown provider
Unknown role
Unknown token
Unknown user
Unknown emoji
Unknown webhook
Unknown webhook service
Unknown session
Unknown ban
Unknown SKU
Unknown Store Listing
Unknown entitlement
Unknown build
Unknown lobby
Unknown branch
Unknown store directory layout
Unknown redistributable
Unknown gift code
Unknown guild template
Unknown interaction
Unknown application command
Unknown application command permissions
Bots cannot use this endpoint
Only bots can use this endpoint
Explicit content cannot be sent to the desired recipient(s)
You are not authorized to perform this action on this application
This action cannot be performed due to slowmode rate limit
Only the owner of this account can perform this action
Message cannot be edited due to announcement rate limits
The channel you are writing has hit the write rate limit
Your Stage topic contains words that are not allowed for public Stages
Maximum number of guilds reached (100)
Maximum number of friends reached (1000)
Maximum number of pins reached for the channel (50)
Maximum number of recipients reached (10)
Maximum number of guild roles reached (250)
Maximum number of webhooks reached (10)
Maximum number of emojis reached
Maximum number of reactions reached (20)
Maximum number of guild channels reached (500)
Maximum number of attachments in a message reached (10)
Maximum number of invites reached (1000)
Maximum number of animated emojis reached
Maximum number of server members reached
Guild already has a template
Maximum number of bans for non-guild members have been exceeded
Maximum number of bans fetches has been reached
Unauthorized. Provide a valid token and try again
You need to verify your account in order to perform this action
You are opening direct messages too fast
Request entity too large. Try sending something smaller in size
This feature has been temporarily disabled server-side
The user is banned from this guild
Target user is not connected to voice
This message has already been crossposted
An application command with that name already exists
Missing access
Invalid account type
Cannot execute action on a DM channel
Guild widget disabled
Cannot edit a message authored by another user
Cannot send an empty message
Cannot send messages to this user
Cannot send messages in a voice channel
Channel verification level is too high for you to gain access
OAuth2 application does not have a bot
OAuth2 application limit reached
Invalid OAuth2 state
You lack permissions to perform that action
Invalid authentication token provided
Note was too long
Provided too few or too many messages to delete. Must provide at least 2 and fewer than 100 messages to delete
A message can only be pinned to the channel it was sent in
Invite code was either invalid or taken
Cannot execute action on a system message
Cannot execute action on this channel type
Invalid OAuth2 access token provided
Missing required OAuth2 scope
Invalid webhook token provided
Invalid role
Invalid recipient(s)
A message provided was too old to bulk delete
Invalid form body (returned for both application/json and multipart/form-data bodies), or invalid Content-Type provided
An invite was accepted to a guild the application’s bot is not in
Invalid API version provided
Cannot self-redeem this gift
Payment source required to redeem gift
Cannot delete a channel required for Community guilds
Invalid sticker sent
Two factor is required for this operation.
No users with DiscordTag exist
Reaction was blocked
API resource is currently overloaded. Try again a little later
Other(u64)
A status code that Twilight doesn’t have registered.
Please report the number if you see this variant!
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V