Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new error codes #742

Merged
merged 3 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rest/api/rest.api
Original file line number Diff line number Diff line change
Expand Up @@ -2185,11 +2185,13 @@ public final class dev/kord/rest/json/JsonErrorCode : java/lang/Enum {
public static final field BitrateTooHigh Ldev/kord/rest/json/JsonErrorCode;
public static final field BotsEndpoint Ldev/kord/rest/json/JsonErrorCode;
public static final field BulkDeleteOldMessage Ldev/kord/rest/json/JsonErrorCode;
public static final field CannotConvertBetweenPremiumAndNormalEmoji Ldev/kord/rest/json/JsonErrorCode;
public static final field CannotDeleteRequiredCommunityChannel Ldev/kord/rest/json/JsonErrorCode;
public static final field CannotEditMessageByAnotherUser Ldev/kord/rest/json/JsonErrorCode;
public static final field CannotEditStickersWithinMessage Ldev/kord/rest/json/JsonErrorCode;
public static final field CannotExecuteOnDM Ldev/kord/rest/json/JsonErrorCode;
public static final field CannotExecuteOnSystemMessage Ldev/kord/rest/json/JsonErrorCode;
public static final field CannotMixSubscriptionAndNonSubscriptionRoles Ldev/kord/rest/json/JsonErrorCode;
public static final field CannotModifySystemWebhook Ldev/kord/rest/json/JsonErrorCode;
public static final field CannotPinMessageFromAnotherChannel Ldev/kord/rest/json/JsonErrorCode;
public static final field CannotReplyWithoutMessageHistoryPermission Ldev/kord/rest/json/JsonErrorCode;
Expand All @@ -2205,6 +2207,7 @@ public final class dev/kord/rest/json/JsonErrorCode : java/lang/Enum {
public static final field Companion Ldev/kord/rest/json/JsonErrorCode$Companion;
public static final field ConnectionRevoked Ldev/kord/rest/json/JsonErrorCode;
public static final field DisallowedName Ldev/kord/rest/json/JsonErrorCode;
public static final field EntityOfEventDifferentFromEventEntity Ldev/kord/rest/json/JsonErrorCode;
public static final field FailedToCreateStage Ldev/kord/rest/json/JsonErrorCode;
public static final field FailedToResizeAssetBelowMaximumSize Ldev/kord/rest/json/JsonErrorCode;
public static final field FileTooLarge Ldev/kord/rest/json/JsonErrorCode;
Expand All @@ -2229,6 +2232,7 @@ public final class dev/kord/rest/json/JsonErrorCode : java/lang/Enum {
public static final field InvalidOAuth2AccessToken Ldev/kord/rest/json/JsonErrorCode;
public static final field InvalidOAuth2State Ldev/kord/rest/json/JsonErrorCode;
public static final field InvalidRecipients Ldev/kord/rest/json/JsonErrorCode;
public static final field InvalidRequestOrigin Ldev/kord/rest/json/JsonErrorCode;
public static final field InvalidRole Ldev/kord/rest/json/JsonErrorCode;
public static final field InvalidStickerFrameRate Ldev/kord/rest/json/JsonErrorCode;
public static final field InvalidStickerSent Ldev/kord/rest/json/JsonErrorCode;
Expand All @@ -2246,13 +2250,15 @@ public final class dev/kord/rest/json/JsonErrorCode : java/lang/Enum {
public static final field MaxFriends Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxGuildChannels Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxGuildRoles Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxGuildWebhooks Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxGuildWidgetSettingsUpdates Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxGuilds Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxInvites Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxLottieAnimationDimensions Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxNonMemberBans Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxOldMessageEdits Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxPins Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxPremiumEmojis Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxPruneRequests Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxReactions Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxRecipients Ldev/kord/rest/json/JsonErrorCode;
Expand Down Expand Up @@ -2284,6 +2290,7 @@ public final class dev/kord/rest/json/JsonErrorCode : java/lang/Enum {
public static final field ReactionBlocked Ldev/kord/rest/json/JsonErrorCode;
public static final field RequestEntityTooLarge Ldev/kord/rest/json/JsonErrorCode;
public static final field Require2FA Ldev/kord/rest/json/JsonErrorCode;
public static final field ResourceIsRateLimited Ldev/kord/rest/json/JsonErrorCode;
public static final field SendMessagesTemporarilyDisabled Ldev/kord/rest/json/JsonErrorCode;
public static final field ServerNeedsMonetizationEnabled Ldev/kord/rest/json/JsonErrorCode;
public static final field ServerNeedsMoreBoosts Ldev/kord/rest/json/JsonErrorCode;
Expand Down
21 changes: 21 additions & 0 deletions rest/src/main/kotlin/json/JsonErrorCode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ public enum class JsonErrorCode(public val code: Int) {
/** Bitrate is too high for channel of this type. */
BitrateTooHigh(30052),

/** Maximum number of premium emojis reached (25). */
MaxPremiumEmojis(30056),

/** Maximum number of webhooks per guild reached (1000). */
MaxGuildWebhooks(30058),

/** Unauthorized. Provide a valid token and try again. */
Unauthorized(40001),

Expand Down Expand Up @@ -298,6 +304,9 @@ public enum class JsonErrorCode(public val code: Int) {
/** Interaction has already been acknowledged. */
InteractionAlreadyAcknowledged(40060),

/** Service resource is being rate limited. */
ResourceIsRateLimited(40062),

/** Missing access. */
MissingAccess(50001),

Expand Down Expand Up @@ -408,6 +417,9 @@ public enum class JsonErrorCode(public val code: Int) {
/** Invalid Guild. */
InvalidGuild(50055),

/** Invalid request origin. */
InvalidRequestOrigin(50067),

/** Invalid message type. */
InvalidMessageType(50068),

Expand Down Expand Up @@ -440,6 +452,9 @@ public enum class JsonErrorCode(public val code: Int) {
/** Community server channels must be text channels. */
CommunityServerChannelMustBeTextChannel(50086),

/** The entity type of the event is different from the entity you are trying to start the event for. */
EntityOfEventDifferentFromEventEntity(50091),

/** This server is not available in your location. */
ServerNotAvailableInLocation(50095),

Expand All @@ -458,6 +473,12 @@ public enum class JsonErrorCode(public val code: Int) {
/** Failed to resize the asset below the maximum size: 262144. */
FailedToResizeAssetBelowMaximumSize(50138),

/** Cannot mix subscription and non subscription roles for an emoji. */
CannotMixSubscriptionAndNonSubscriptionRoles(50144),

/** Cannot convert between premium emoji and normal emoji. */
CannotConvertBetweenPremiumAndNormalEmoji(50145),

/** Uploaded file not found. */
UnknownUpload(50146),

Expand Down