-
-
Notifications
You must be signed in to change notification settings - Fork 114
/
common.ts
199 lines (142 loc) · 4.67 KB
/
common.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes
*/
export enum RESTJSONErrorCodes {
GeneralError,
UnknownAccount = 10001,
UnknownApplication,
UnknownChannel,
UnknownGuild,
UnknownIntegration,
UnknownInvite,
UnknownMember,
UnknownMessage,
UnknownPermissionOverwrite,
UnknownProvider,
UnknownRole,
UnknownToken,
UnknownUser,
UnknownEmoji,
UnknownWebhook,
UnknownWebhookService,
UnknownSession = 10020,
UnknownBan = 10026,
UnknownSKU,
UnknownStoreListing,
UnknownEntitlement,
UnknownBuild,
UnknownLobby,
UnknownBranch,
UnknownStoreDirectoryLayout,
UnknownRedistributable = 10036,
UnknownGiftCode = 10038,
UnknownStream = 10049,
UnknownPremiumServerSubscribeCooldown,
UnknownGuildTemplate = 10057,
UnknownDiscoverableServerCategory = 10059,
UnknownSticker,
UnknownInteraction = 10062,
UnknownApplicationCommand,
UnknownApplicationCommandPermissions = 10066,
UnknownStageInstance,
UnknownGuildMemberVerificationForm,
UnknownGuildWelcomeScreen,
UnknownGuildScheduledEvent,
UnknownGuildScheduledEventUser,
BotsCannotUseThisEndpoint = 20001,
OnlyBotsCanUseThisEndpoint,
ExplicitContentCannotBeSentToTheDesiredRecipient = 20009,
NotAuthorizedToPerformThisActionOnThisApplication = 20012,
ActionCannotBePerformedDueToSlowmodeRateLimit = 20016,
OnlyTheOwnerOfThisAccountCanPerformThisAction = 20018,
AnnouncementEditLimitExceeded = 20022,
ChannelSendRateLimit = 20028,
StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords = 20031,
GuildPremiumSubscriptionLevelTooLow = 20035,
MaximumNumberOfGuildsReached = 30001,
MaximumNumberOfFriendsReached,
MaximumNumberOfPinsReachedForTheChannel,
MaximumNumberOfRecipientsReached,
MaximumNumberOfGuildRolesReached,
MaximumNumberOfWebhooksReached = 30007,
MaximumNumberOfEmojisReached,
MaximumNumberOfReactionsReached = 30010,
MaximumNumberOfGuildChannelsReached = 30013,
MaximumNumberOfAttachmentsInAMessageReached = 30015,
MaximumNumberOfInvitesReached,
MaximumNumberOfAnimatedEmojisReached = 30018,
MaximumNumberOfServerMembersReached,
MaximumNumberOfServerCategoriesReached = 30030,
GuildAlreadyHasTemplate = 30031,
MaximumThreadParticipants = 30033,
MaximumNumberOfNonGuildMemberBansHasBeenExceeded = 30035,
MaximumNumberOfBanFetchesHasBeenReached = 30037,
MaximumNumberOfStickersReached = 30039,
MaximumNumberOfPruneRequestsHasBeenReached,
Unauthorized = 40001,
VerifyYourAccount,
OpeningDirectMessagesTooFast,
RequestEntityTooLarge = 40005,
FeatureTemporarilyDisabledServerSide,
UserBannedFromThisGuild,
TargetUserIsNotConnectedToVoice = 40032,
ThisMessageWasAlreadyCrossposted,
ApplicationCommandWithThatNameAlreadyExists = 40041,
MissingAccess = 50001,
InvalidAccountType,
CannotExecuteActionOnDMChannel,
GuildWidgetDisabled,
CannotEditMessageAuthoredByAnotherUser,
CannotSendAnEmptyMessage,
CannotSendMessagesToThisUser,
CannotSendMessagesInVoiceChannel,
ChannelVerificationLevelTooHighForYouToGainAccess,
OAuth2ApplicationDoesNotHaveBot,
OAuth2ApplicationLimitReached,
InvalidOAuth2State,
MissingPermissions,
InvalidToken,
NoteWasTooLong,
ProvidedTooFewOrTooManyMessagesToDelete,
MessageCanOnlyBePinnedInTheChannelItWasSentIn = 50019,
InviteCodeInvalidOrTaken,
CannotExecuteActionOnSystemMessage,
CannotExecuteActionOnThisChannelType = 50024,
InvalidOAuth2AccessToken,
MissingRequiredOAuth2Scope,
InvalidWebhookToken = 50027,
InvalidRole,
InvalidRecipients = 50033,
OneOfTheMessagesProvidedWasTooOldForBulkDelete,
InvalidFormBodyOrContentType,
InviteAcceptedToGuildWithoutTheBotBeingIn,
InvalidAPIVersion = 50041,
FileUploadedExceedsMaximumSize = 50045,
InvalidFileUploaded,
CannotSelfRedeemThisGift = 50054,
PaymentSourceRequiredToRedeemGift = 50070,
CannotDeleteChannelRequiredForCommunityGuilds = 50074,
InvalidStickerSent = 50081,
InvalidActionOnArchivedThread = 50083,
InvalidThreadNotificationSettings,
ParameterEarlierThanCreation,
ServerNotAvailableInYourLocation = 50095,
ServerNeedsMonetizationEnabledToPerformThisAction = 50097,
TwoFactorAuthenticationIsRequired = 60003,
NoUsersWithDiscordTagExist = 80004,
ReactionWasBlocked = 90001,
APIResourceOverloaded = 130000,
TheStageIsAlreadyOpen = 150006,
CannotReplyWithoutPermissionToReadMessageHistory = 160002,
ThreadAlreadyCreatedForMessage = 160004,
ThreadLocked,
MaximumActiveThreads,
MaximumActiveAnnouncementThreads,
InvalidJSONForUploadedLottieFile = 170001,
UploadedLottiesCannotContainRasterizedImages,
StickerMaximumFramerateExceeded,
StickerFrameCountExceedsMaximumOf1000Frames,
LottieAnimationMaximumDimensionsExceeded,
StickerFramerateIsTooSmallOrTooLarge,
StickerAnimationDurationExceedsMaximumOf5Seconds,
}