Skip to content

Commit

Permalink
Add new error codes (kordlib#834)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukellmann authored Jun 13, 2023
1 parent 546fe6f commit 4bca754
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rest/api/rest.api
Original file line number Diff line number Diff line change
Expand Up @@ -2520,6 +2520,7 @@ public final class dev/kord/rest/json/JsonErrorCode : java/lang/Enum {
public static final field OAuth2HasNoBot Ldev/kord/rest/json/JsonErrorCode;
public static final field OnlyOwner Ldev/kord/rest/json/JsonErrorCode;
public static final field OperationOnArchivedThread Ldev/kord/rest/json/JsonErrorCode;
public static final field OwnerCannotBePendingMember Ldev/kord/rest/json/JsonErrorCode;
public static final field OwnershipCannotBeTransferredToBot Ldev/kord/rest/json/JsonErrorCode;
public static final field PermissionLack Ldev/kord/rest/json/JsonErrorCode;
public static final field ProvidedMessageCountInsufficient Ldev/kord/rest/json/JsonErrorCode;
Expand Down Expand Up @@ -2590,6 +2591,7 @@ public final class dev/kord/rest/json/JsonErrorCode : java/lang/Enum {
public static final field UnknownVoiceState Ldev/kord/rest/json/JsonErrorCode;
public static final field UnknownWebhook Ldev/kord/rest/json/JsonErrorCode;
public static final field UnknownWebhookService Ldev/kord/rest/json/JsonErrorCode;
public static final field UserAccountMustBeVerified Ldev/kord/rest/json/JsonErrorCode;
public static final field UserBannedFromGuild Ldev/kord/rest/json/JsonErrorCode;
public static final field UserNotInVoice Ldev/kord/rest/json/JsonErrorCode;
public static final field VerifyAccount Ldev/kord/rest/json/JsonErrorCode;
Expand Down
6 changes: 6 additions & 0 deletions rest/src/commonMain/kotlin/json/JsonErrorCode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ public enum class JsonErrorCode(public val code: Int) {
/** The request body contains invalid JSON. */
InvalidJsonInRequestBody(50109),

/** Owner cannot be pending member. */
OwnerCannotBePendingMember(50131),

/** Ownership cannot be transferred to a bot user. */
OwnershipCannotBeTransferredToBot(50132),

Expand Down Expand Up @@ -530,6 +533,9 @@ public enum class JsonErrorCode(public val code: Int) {
/** You cannot send voice messages in this channel. */
CannotSendVoiceMessagesInThisChannel(50173),

/** The user account must first be verified. */
UserAccountMustBeVerified(50178),

/** You do not have permission to send this sticker. */
StickerPermissionLack(50600),

Expand Down

0 comments on commit 4bca754

Please sign in to comment.