Skip to content

Commit

Permalink
Add error responses
Browse files Browse the repository at this point in the history
  • Loading branch information
freya022 committed Oct 17, 2024
1 parent bf699f4 commit cca03d8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/net/dv8tion/jda/api/requests/ErrorResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public enum ErrorResponse
UNKNOWN_WEBHOOK( 10015, "Unknown Webhook"),
UNKNOWN_WEBHOOK_SERVICE( 10016, "Unknown Webhook Service"),
UNKNOWN_SESSION( 10020, "Unknown session"),
UNKNOWN_ASSET( 10021, "Unknown Asset"),
UNKNOWN_BAN( 10026, "Unknown Ban"),
UNKNOWN_SKU( 10027, "Unknown SKU"),
UNKNOWN_STORE_LISTING( 10028, "Unknown Store Listing"),
Expand All @@ -79,6 +80,7 @@ public enum ErrorResponse
UNKNOWN_SCHEDULED_EVENT( 10070, "Unknown Scheduled Event"),
UNKNOWN_SCHEDULED_EVENT_USER( 10071, "Unknown Scheduled Event User"),
UNKNOWN_TAG( 10087, "Unknown Tag"),
UNKNOWN_SOUND( 10097, "Unknown sound"),
BOTS_NOT_ALLOWED( 20001, "Bots cannot use this endpoint"),
ONLY_BOTS_ALLOWED( 20002, "Only bots can use this endpoint"),
EXPLICIT_CONTENT_CANNOT_SEND_TO_RECIPIENT(20009, "Explicit content cannot be sent to the desired recipient(s)"),
Expand Down Expand Up @@ -114,6 +116,7 @@ public enum ErrorResponse
MAX_STICKERS( 30039, "Maximum number of stickers reached"),
MAX_PRUNE_REQUESTS( 30040, "Maximum number of prune requests has been reached. Try again later"),
MAX_GUILD_WIDGET_UPDATES( 30042, "Maximum number of guild widget settings updates has been reached. Try again later"),
MAX_SOUNDBOARD_SOUNDS( 30045, "Maximum number of soundboard sounds reached"),
MAX_OLD_MESSAGE_EDITS( 30046, "Maximum number of edits to messages older than 1 hour reached. Try again later"),
MAX_PINNED_THREADS_IN_FORUM( 30047, "Maximum number of pinned threads in a forum channel has been reached"),
MAX_FORUM_TAGS( 30048, "Maximum number of tags in a forum channel has been reached"),
Expand Down Expand Up @@ -192,19 +195,25 @@ public enum ErrorResponse
SERVER_MONETIZATION_DISABLED( 50097, "This server needs monetization enabled in order to perform this action"),
SERVER_NOT_ENOUGH_BOOSTS( 50101, "This server needs more boosts to perform this action"),
INVALID_REQUEST_BODY( 50109, "The request body contains invalid JSON."),
INVALID_FILE( 50110, "The provided file is invalid."),
INVALID_FILE_TYPE( 50123, "The provided file type is invalid."),
INVALID_FILE_EXCEEDS_MAXIMUM_LENGTH( 50124, "The provided file duration exceeds maximum of 5.2 seconds."),
OWNER_CANNOT_BE_PENDING( 50131, "Owner cannot be pending member"),
OWNER_TRANSFER_TO_BOT( 50132, "Ownership cannot be transferred to a bot user"),
CANNOT_RESIZE_BELOW_MAXIMUM( 50138, "Failed to resize asset below the maximum size: 262144"),
MIXED_PREMIUM_ROLES_FOR_EMOJI( 50144, "Cannot mix subscription and non subscription roles for an emoji"),
ILLEGAL_EMOJI_CONVERSION( 50145, "Cannot convert between premium emoji and normal emoji"),
UNKNOWN_UPLOADED_FILE( 50146, "Uploaded file not found"),
INVALID_EMOJI( 50151, "The specified emoji is invalid"),
VOICE_MESSAGE_ADDITIONAL_CONTENT( 50159, "Voice messages do not support additional content"),
VOICE_MESSAGE_TOO_MANY_AUDIO_ATTACHMENTS( 50160, "Voice messages must have a single audio attachment"),
VOICE_MESSAGE_MISSING_METADATA( 50161, "Voice messages must have supporting metadata"),
CANNOT_EDIT_VOICE_MESSAGE( 50162, "Voice messages cannot be edited"),
CANNOT_DELETE_GUILD_INTEGRATION( 50163, "Cannot delete guild subscription integration"),
CANNOT_SEND_VOICE_EFFECT( 50167, "Cannot send voice effect when user is server muted, deafened or suppressed"),
CANNOT_SEND_VOICE_MESSAGE( 50173, "You cannot send voice messages in this channel"),
USER_MUST_BE_VERIFIED( 50178, "The user account must first be verified"),
INVALID_FILE_DURATION( 50192, "The provided file does not have a valid duration"),
CANNOT_SEND_STICKER( 50600, "You do not have permission to send this sticker"),
MFA_NOT_ENABLED( 60003, "MFA auth required but not enabled"),
NO_USER_WITH_TAG_EXISTS( 80004, "No users with DiscordTag exist"),
Expand Down

0 comments on commit cca03d8

Please sign in to comment.