feat: add RESTJSONErrorCode 40062 and RESTRateLimit.code (#620)

This commit is contained in:
advaith
2023-01-05 03:38:37 -08:00
committed by GitHub
parent 6e4a6115ae
commit 4a25caf506
4 changed files with 14 additions and 0 deletions

View File

@@ -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
*/

View File

@@ -143,6 +143,7 @@ export enum RESTJSONErrorCodes {
InteractionHasAlreadyBeenAcknowledged = 40060,
TagNamesMustBeUnique,
ServiceResourceIsBeingRateLimited,
ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40066,
TagRequiredToCreateAForumPostInThisChannel,

View File

@@ -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
*/

View File

@@ -143,6 +143,7 @@ export enum RESTJSONErrorCodes {
InteractionHasAlreadyBeenAcknowledged = 40060,
TagNamesMustBeUnique,
ServiceResourceIsBeingRateLimited,
ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40066,
TagRequiredToCreateAForumPostInThisChannel,