feat(RESTJSONErrorCodes): add error code 50278 (#1587)

This commit is contained in:
kshitijanurag
2026-03-23 02:38:51 +05:30
committed by GitHub
parent e65e02f05f
commit 662cb0cb0a
2 changed files with 38 additions and 0 deletions

19
deno/rest/common.ts generated
View File

@@ -173,6 +173,9 @@ export enum RESTJSONErrorCodes {
GuildWidgetDisabled,
CannotEditMessageAuthoredByAnotherUser,
CannotSendAnEmptyMessage,
/**
* @see {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser_2} for a similar error code
*/
CannotSendMessagesToThisUser,
CannotSendMessagesInNonTextChannel,
ChannelVerificationLevelTooHighForYouToGainAccess,
@@ -270,6 +273,11 @@ export enum RESTJSONErrorCodes {
ProvidedFileDoesNotHaveAValidDuration = 50_192,
/**
* @see {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser} for a similar error code
*/
CannotSendMessagesToThisUser_2 = 50_278,
YouDoNotHavePermissionToSendThisSticker = 50_600,
TwoFactorAuthenticationIsRequired = 60_003,
@@ -339,6 +347,17 @@ export enum RESTJSONErrorCodes {
InvalidClientSecret,
}
/**
* JSON Error Codes that represent "Cannot send messages to this user".
* Discord uses two different error codes for this error:
* - {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser} (50_007)
* - {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser_2} (50_278)
*/
export const CannotSendMessagesToThisUserErrorCodes = [
RESTJSONErrorCodes.CannotSendMessagesToThisUser,
RESTJSONErrorCodes.CannotSendMessagesToThisUser_2,
] as const;
/**
* @see {@link https://discord.com/developers/docs/reference#locales}
*/

View File

@@ -173,6 +173,9 @@ export enum RESTJSONErrorCodes {
GuildWidgetDisabled,
CannotEditMessageAuthoredByAnotherUser,
CannotSendAnEmptyMessage,
/**
* @see {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser_2} for a similar error code
*/
CannotSendMessagesToThisUser,
CannotSendMessagesInNonTextChannel,
ChannelVerificationLevelTooHighForYouToGainAccess,
@@ -270,6 +273,11 @@ export enum RESTJSONErrorCodes {
ProvidedFileDoesNotHaveAValidDuration = 50_192,
/**
* @see {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser} for a similar error code
*/
CannotSendMessagesToThisUser_2 = 50_278,
YouDoNotHavePermissionToSendThisSticker = 50_600,
TwoFactorAuthenticationIsRequired = 60_003,
@@ -339,6 +347,17 @@ export enum RESTJSONErrorCodes {
InvalidClientSecret,
}
/**
* JSON Error Codes that represent "Cannot send messages to this user".
* Discord uses two different error codes for this error:
* - {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser} (50_007)
* - {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser_2} (50_278)
*/
export const CannotSendMessagesToThisUserErrorCodes = [
RESTJSONErrorCodes.CannotSendMessagesToThisUser,
RESTJSONErrorCodes.CannotSendMessagesToThisUser_2,
] as const;
/**
* @see {@link https://discord.com/developers/docs/reference#locales}
*/