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 more JSON Error codes #757

Merged
merged 2 commits into from
Feb 16, 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
3 changes: 3 additions & 0 deletions rest/api/rest.api
Original file line number Diff line number Diff line change
Expand Up @@ -2230,6 +2230,7 @@ public final class dev/kord/rest/json/JsonErrorCode : java/lang/Enum {
public static final field CannotUpdateFinishedEvent Ldev/kord/rest/json/JsonErrorCode;
public static final field ChannelVerificationTooHigh Ldev/kord/rest/json/JsonErrorCode;
public static final field ChannelWriteRateLimit Ldev/kord/rest/json/JsonErrorCode;
public static final field ChannelsTooLarge Ldev/kord/rest/json/JsonErrorCode;
public static final field CommunityServerChannelMustBeTextChannel Ldev/kord/rest/json/JsonErrorCode;
public static final field Companion Ldev/kord/rest/json/JsonErrorCode$Companion;
public static final field ConnectionRevoked Ldev/kord/rest/json/JsonErrorCode;
Expand Down Expand Up @@ -2272,9 +2273,11 @@ public final class dev/kord/rest/json/JsonErrorCode : java/lang/Enum {
public static final field MaxApplicationCommands Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxAttachments Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxBanFetches Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxChannelPermissionOverwrites Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxDailyApplicationCommandCreates Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxEmojis Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxFriends Ldev/kord/rest/json/JsonErrorCode;
public static final field MaxGroupDMs 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;
Expand Down
9 changes: 9 additions & 0 deletions rest/src/main/kotlin/json/JsonErrorCode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ public enum class JsonErrorCode(public val code: Int) {
/** Maximum number of reactions reached (20). */
MaxReactions(30010),

/** Maximum number of group DMs reached (10). */
MaxGroupDMs(30011),

/** Maximum number of guild channels reached (500). */
MaxGuildChannels(30013),

Expand Down Expand Up @@ -265,6 +268,12 @@ public enum class JsonErrorCode(public val code: Int) {
/** Maximum number of webhooks per guild reached (1000). */
MaxGuildWebhooks(30058),

/** Maximum number of channel permission overwrites reached (1000). */
MaxChannelPermissionOverwrites(30060),

/** The channels for this guild are too large. */
ChannelsTooLarge(30061),

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

Expand Down