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

feat: add RESTJSONErrorCode 40062 and RESTRateLimit.code #620

Merged
merged 3 commits into from
Jan 5, 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
6 changes: 6 additions & 0 deletions deno/payloads/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ export type RESTErrorData = RESTErrorGroupWrapper | RESTErrorFieldInformation |
* https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure
*/
export interface RESTRateLimit {
/**
* An error code for some limits
*
* {@link RESTJSONErrorCodes}
*/
code?: number;
/**
* A value indicating if you are being globally rate limited or not
*/
Expand Down
1 change: 1 addition & 0 deletions deno/rest/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export enum RESTJSONErrorCodes {

InteractionHasAlreadyBeenAcknowledged = 40060,
TagNamesMustBeUnique,
ServiceResourceIsBeingRateLimited,

ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40066,
TagRequiredToCreateAForumPostInThisChannel,
Expand Down
6 changes: 6 additions & 0 deletions payloads/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ export type RESTErrorData = RESTErrorGroupWrapper | RESTErrorFieldInformation |
* https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure
*/
export interface RESTRateLimit {
/**
* An error code for some limits
*
* {@link RESTJSONErrorCodes}
*/
code?: number;
/**
* A value indicating if you are being globally rate limited or not
*/
Expand Down
1 change: 1 addition & 0 deletions rest/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export enum RESTJSONErrorCodes {

InteractionHasAlreadyBeenAcknowledged = 40060,
TagNamesMustBeUnique,
ServiceResourceIsBeingRateLimited,

ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40066,
TagRequiredToCreateAForumPostInThisChannel,
Expand Down