Package net.dv8tion.jda.api.requests
Enum ErrorResponse
- All Implemented Interfaces:
Serializable
,Comparable<ErrorResponse>
Constants for easy use in
ErrorResponseException
and ErrorHandler
.- See Also:
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorResponse
fromCode
(int code) static ErrorResponse
fromJSON
(DataObject obj) int
getCode()
boolean
Tests whether the given throwable is anErrorResponseException
withErrorResponseException.getErrorResponse()
equal to this.test
(Collection<ErrorResponse> responses) Provides a tests whether a given throwable is anErrorResponseException
withErrorResponseException.getErrorResponse()
being one of the provided responses.test
(ErrorResponse... responses) Provides a tests whether a given throwable is anErrorResponseException
withErrorResponseException.getErrorResponse()
being one of the provided responses.static ErrorResponse
Returns the enum constant of this type with the specified name.static ErrorResponse[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN_ACCOUNT
-
UNKNOWN_APPLICATION
-
UNKNOWN_CHANNEL
-
UNKNOWN_GUILD
-
UNKNOWN_INTEGRATION
-
UNKNOWN_INVITE
-
UNKNOWN_MEMBER
-
UNKNOWN_MESSAGE
-
UNKNOWN_OVERRIDE
-
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_STREAM
-
UNKNOWN_PREMIUM_SERVER_SUBSCRIBE_COOLDOWN
-
UNKNOWN_GUILD_TEMPLATE
-
UNKNOWN_DISCOVERABLE_SERVER_CATEGORY
-
UNKNOWN_STICKER
-
UNKNOWN_INTERACTION
-
UNKNOWN_COMMAND
-
UNKNOWN_COMMAND_PERMISSIONS
-
UNKNOWN_STAGE_INSTANCE
-
UNKNOWN_GUILD_MEMBER_VERIFICATION_FORM
-
UNKNOWN_GUILD_WELCOME_SCREEN
-
UNKNOWN_GUILD_SCHEDULED_EVENT
-
UNKNOWN_GUILD_SCHEDULED_EVENT_USER
-
BOTS_NOT_ALLOWED
-
ONLY_BOTS_ALLOWED
-
EXPLICIT_CONTENT_CANNOT_SEND_TO_RECIPIENT
-
NOT_AUTHORIZED_PERFORM_ACTION
-
SLOWMODE_RATE_LIMIT
-
OWNER_ONLY
-
ANNOUNCEMENT_RATE_LIMIT
-
CHANNEL_WRITE_RATE_LIMIT
-
GUILD_EXPLICIT_CONTENT_FILTER
-
GUILD_OREMIUM_LEVE_TOO_LOW
-
MAX_GUILDS
-
MAX_FRIENDS
-
MAX_MESSAGE_PINS
-
MAX_USERS_PER_DM
-
MAX_ROLES_PER_GUILD
-
MAX_WEBHOOKS
-
MAX_EMOTES
-
TOO_MANY_REACTIONS
-
MAX_CHANNELS
-
MAX_ATTACHMENTS
-
MAX_INVITES
-
MAX_ANIMATED_EMOTES
-
MAX_MEMBERS
-
MAX_CATEGORIES
-
ALREADY_HAS_TEMPLATE
-
MAX_THREAD_PARTICIPANTS
-
MAX_NON_GUILD_MEMBER_BANS
-
MAX_BAN_FETCHES
-
MAX_STICKERS
-
MAX_PRUNE_REQUESTS
-
MAX_GUILD_WIDGET_UPDATES
-
UNAUTHORIZED
-
NOT_VERIFIED
-
OPEN_DM_TOO_FAST
-
REQUEST_ENTITY_TOO_LARGE
-
FEATURE_TEMPORARILY_DISABLED
-
USER_BANNED_FROM_GUILD
-
USER_NOT_CONNECTED
-
ALREADY_CROSSPOSTED
-
APPLICATION_COMMAND_NAME_ALREADY_EXISTS
-
MISSING_ACCESS
-
INVALID_ACCOUNT_TYPE
-
INVALID_DM_ACTION
-
EMBED_DISABLED
-
INVALID_AUTHOR_EDIT
-
EMPTY_MESSAGE
-
CANNOT_SEND_TO_USER
-
CANNOT_MESSAGE_VC
-
VERIFICATION_ERROR
-
OAUTH_NOT_BOT
-
MAX_OAUTH_APPS
-
INVALID_OAUTH_STATE
-
MISSING_PERMISSIONS
-
INVALID_TOKEN
-
NOTE_TOO_LONG
-
INVALID_BULK_DELETE
-
INVALID_MFA_LEVEL
-
INVALID_PASSWORD
-
INVALID_PIN
-
INVITE_CODE_INVALID
-
INVALID_MESSAGE_TARGET
-
INVALID_CHANNEL_TYPE
-
INVALID_OAUTH_ACCESS_TOKEN
-
MISSING_OAUTH_SCOPE
-
INVALID_WEBHOOK_TOKEN
-
INVALID_ROLE
-
INVALID_RECIPIENT
-
INVALID_BULK_DELETE_MESSAGE_AGE
-
INVALID_FORM_BODY
-
INVITE_FOR_UNKNOWN_GUILD
-
INVALID_API_VERSION
-
FILE_UPLOAD_MAX_SIZE_EXCEEDED
-
INVALID_FILE_UPLOADED
-
CANNOT_SELF_REDEEM_GIFT
-
PAYMENT_SOURCE_REQUIRED
-
CANNOT_DELETE_CHANNEL_COMMUNITY
-
INVALID_STICKER_SENT
-
ILLEGAL_OPERATION_ARCHIVED_THREAD
-
INVALID_THREAD_NOTIFICATION_SETTINGS
-
BEFORE_VALUE_EARLIER_THAN_THREAD_CREATION
-
SERVER_NOT_AVAILABLE_IN_YOUR_LOCATION
-
SERVER_MONETIZATION_DISABLED
-
SERVER_NOT_ENOUGH_BOOSTS
-
MFA_NOT_ENABLED
-
NO_USER_WITH_TAG_EXISTS
-
REACTION_BLOCKED
-
RESOURCES_OVERLOADED
-
STAGE_ALREADY_OPEN
-
REPLY_FAILED_MISSING_MESSAGE_HISTORY_PERM
-
THREAD_WITH_THIS_MESSAGE_ALREADY_EXISTS
-
THREAD_LOCKED
-
MAX_ACTIVE_THREADS
-
MAX_ANNOUNCEMENT_THREADS
-
INVALID_LOTTIE_JSON
-
LOTTIE_CANNOT_CONTAIN_RASTERIZED_IMAGE
-
MAX_STICKER_FPS
-
MAX_STICKER_FRAMES
-
MAX_LOTTIE_ANIMATION_DIMENSION
-
STICKER_FPS_TOO_SMALL_OR_TOO_LARGE
-
MAX_STICKER_ANIMATION_DURATION
-
SERVER_ERROR
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getCode
public int getCode() -
getMeaning
-
test
Tests whether the given throwable is anErrorResponseException
withErrorResponseException.getErrorResponse()
equal to this.
This is very useful in combination withRestAction.onErrorMap(Predicate, Function)
andRestAction.onErrorFlatMap(Predicate, Function)
!- Parameters:
throwable
- The throwable to test- Returns:
- True, if the error response is equal to this
-
test
Provides a tests whether a given throwable is anErrorResponseException
withErrorResponseException.getErrorResponse()
being one of the provided responses.
This is very useful in combination withRestAction.onErrorMap(Predicate, Function)
andRestAction.onErrorFlatMap(Predicate, Function)
!- Parameters:
responses
- The responses to test for- Returns:
Predicate
which returns true, if the error response is equal to this
-
test
Provides a tests whether a given throwable is anErrorResponseException
withErrorResponseException.getErrorResponse()
being one of the provided responses.
This is very useful in combination withRestAction.onErrorMap(Predicate, Function)
andRestAction.onErrorFlatMap(Predicate, Function)
!- Parameters:
responses
- The responses to test for- Returns:
Predicate
which returns true, if the error response is equal to this
-
fromCode
-
fromJSON
-