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,
UnknownBan,
UnknownSKU,
UnknownStoreListing,
UnknownEntitlement,
UnknownBuild,
UnknownLobby,
UnknownBranch,
UnknownRedistributable,
UnknownGuildTemplate,
UnknownInteraction,
BotsCannotUseEndpoint,
OnlyBotsCanUseEndpoint,
AnnouncementRateLimitReached,
ChannelRateLimitReached,
MaximumGuildsReached,
MaximumFriendsReached,
MaximumPinsReached,
MaximumRolesReached,
MaximumWebhooksReached,
MaximumReactionsReached,
MaximumGuildChannelsReached,
MaximumAttachmentsReached,
MaximumInvitesReached,
GuildTemplateAlreadyExist,
MaximumNonGuildBansReached,
Unauthorized,
AccountNeedsVerification,
RequestEntityTooLarge,
FeatureTemporarilyDisabled,
UserBannedFromGuild,
MessageAlreadyCrossposted,
Missingaccess,
InvalidAccountType,
InvalidDMChannelAction,
GuildWidgetDisabled,
MessageNotAuthoredByUser,
EmptyMessage,
CannotSendMessageToUser,
CannotSendMessagesInVoiceChannel,
VerificationLevelTooHigh,
OAuthApplicationHasNoBot,
OAuthApplicationLimitReached,
InvalidOAuthSstate,
PermissionsLacking,
InvalidAuthenticationTokenProvided,
NoteTooLong,
InvalidMessageDeleteRange,
MessagePinnedInWrongChannel,
InviteCodeInvalidOrTaken,
InvalidActionOnSystemMessage,
CannotExecuteActionOnChannelType,
InvalidOAuthAccessToken,
InvalidWebhookToken,
InvalidRecipient,
MessageTooOldToBulkDelete,
InvalidFormBodyOrContentType,
InviteAcceptedToGuildBotNotIn,
InvalidApiVersion,
CommunityGuildRequired,
InvalidStickerSent,
TwoFactorRequired,
ReactionBlocked,
ApiResourceOverloaded,
Other(u64),
}Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Expand description
General error (such as a malformed request body, amongst other things)
Expand description
Unknown account
Expand description
Unknown application
Expand description
Unknown channel
Expand description
Unknown guild
Expand description
Unknown integration
Expand description
Unknown invite
Expand description
Unknown member
Expand description
Unknown message
Expand description
Unknown permission overwrite
Expand description
Unknown provider
Expand description
Unknown role
Expand description
Unknown token
Expand description
Unknown user
Expand description
Unknown emoji
Expand description
Unknown webhook
Expand description
Unknown ban
Expand description
Unknown SKU
Expand description
Unknown Store Listing
Expand description
Unknown entitlement
Expand description
Unknown build
Expand description
Unknown lobby
Expand description
Unknown branch
Expand description
Unknown redistributable
Expand description
Unknown guild template
Expand description
Unknown interaction
Expand description
Bots cannot use this endpoint
Expand description
Only bots can use this endpoint
Expand description
Message cannot be edited due to announcement rate limits
Expand description
The channel you are writing has hit the write rate limit
Expand description
Maximum number of guilds reached (100)
Expand description
Maximum number of friends reached (1000)
Expand description
Maximum number of pins reached for the channel (50)
Expand description
Maximum number of guild roles reached (250)
Expand description
Maximum number of webhooks reached (10)
Expand description
Maximum number of reactions reached (20)
Expand description
Maximum number of guild channels reached (500)
Expand description
Maximum number of attachments in a message reached (10)
Expand description
Maximum number of invites reached (1000)
Expand description
Guild already has a template
Expand description
Maximum number of bans for non-guild members have been exceeded
Expand description
Unauthorized. Provide a valid token and try again
Expand description
You need to verify your account in order to perform this action
Expand description
Request entity too large. Try sending something smaller in size
Expand description
This feature has been temporarily disabled server-side
Expand description
The user is banned from this guild
Expand description
This message has already been crossposted
Expand description
Missing access
Expand description
Invalid account type
Expand description
Cannot execute action on a DM channel
Expand description
Guild widget disabled
Expand description
Cannot edit a message authored by another user
Expand description
Cannot send an empty message
Expand description
Cannot send messages to this user
Expand description
Cannot send messages in a voice channel
Expand description
Channel verification level is too high for you to gain access
Expand description
OAuth2 application does not have a bot
Expand description
OAuth2 application limit reached
Expand description
Invalid OAuth2 state
Expand description
You lack permissions to perform that action
Expand description
Invalid authentication token provided
Expand description
Note was too long
Expand description
Provided too few or too many messages to delete. Must provide at least 2 and fewer than 100 messages to delete
Expand description
A message can only be pinned to the channel it was sent in
Expand description
Invite code was either invalid or taken
Expand description
Cannot execute action on a system message
Expand description
Cannot execute action on this channel type
Expand description
Invalid OAuth2 access token provided
Expand description
Invalid webhook token provided
Expand description
Invalid recipient(s)
Expand description
A message provided was too old to bulk delete
Expand description
Invalid form body (returned for both application/json and multipart/form-data bodies), or invalid Content-Type provided
Expand description
An invite was accepted to a guild the application’s bot is not in
Expand description
Invalid API version provided
Expand description
Cannot delete a channel required for Community guilds
Expand description
Invalid sticker sent
Expand description
Two factor is required for this operation.
Expand description
Reaction was blocked
Expand description
API resource is currently overloaded. Try again a little later
Other(u64)Expand description
A status code that Twilight doesn’t have registered.
Please report the number if you see this variant!
Implementations
Trait Implementations
impl<'de> Deserialize<'de> for ErrorCode[src]
impl<'de> Deserialize<'de> for ErrorCode[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>[src]Deserialize this value from the given Serde deserializer. Read more
impl Copy for ErrorCode[src]
impl Eq for ErrorCode[src]
impl StructuralEq for ErrorCode[src]
impl StructuralPartialEq for ErrorCode[src]
Auto Trait Implementations
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]pub fn equivalent(&self, key: &K) -> bool[src]
pub fn equivalent(&self, key: &K) -> bool[src]Compare self to key and return true if they are equal.
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>, pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,