oceanic.js 1.10.3-dev.c6c9f52 → 1.10.3-dev.ca8b6e8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/dist/lib/Client.d.ts +99 -0
  2. package/dist/lib/Client.js +263 -0
  3. package/dist/lib/Constants.d.ts +1215 -0
  4. package/dist/lib/Constants.js +1513 -0
  5. package/dist/lib/gateway/Shard.d.ts +83 -0
  6. package/dist/lib/gateway/Shard.js +1621 -0
  7. package/dist/lib/gateway/ShardManager.d.ts +29 -0
  8. package/dist/lib/gateway/ShardManager.js +300 -0
  9. package/dist/lib/index.d.ts +84 -0
  10. package/dist/lib/index.js +168 -0
  11. package/dist/lib/rest/Bucket.d.ts +33 -0
  12. package/dist/lib/rest/Bucket.js +78 -0
  13. package/dist/lib/rest/DiscordHTTPError.d.ts +16 -0
  14. package/dist/lib/rest/DiscordHTTPError.js +65 -0
  15. package/dist/lib/rest/DiscordRESTError.d.ts +19 -0
  16. package/dist/lib/rest/DiscordRESTError.js +89 -0
  17. package/dist/lib/rest/OAuthHelper.d.ts +62 -0
  18. package/dist/lib/rest/OAuthHelper.js +183 -0
  19. package/dist/lib/rest/RESTManager.d.ts +42 -0
  20. package/dist/lib/rest/RESTManager.js +82 -0
  21. package/dist/lib/rest/RequestHandler.d.ts +28 -0
  22. package/dist/lib/rest/RequestHandler.js +313 -0
  23. package/dist/lib/rest/SequentialBucket.d.ts +25 -0
  24. package/dist/lib/rest/SequentialBucket.js +76 -0
  25. package/dist/lib/routes/Applications.d.ts +171 -0
  26. package/dist/lib/routes/Applications.js +447 -0
  27. package/dist/lib/routes/Channels.d.ts +408 -0
  28. package/dist/lib/routes/Channels.js +1160 -0
  29. package/dist/lib/routes/Guilds.d.ts +606 -0
  30. package/dist/lib/routes/Guilds.js +1669 -0
  31. package/dist/lib/routes/Interactions.d.ts +74 -0
  32. package/dist/lib/routes/Interactions.js +141 -0
  33. package/dist/lib/routes/Miscellaneous.d.ts +31 -0
  34. package/dist/lib/routes/Miscellaneous.js +69 -0
  35. package/dist/lib/routes/OAuth.d.ts +108 -0
  36. package/dist/lib/routes/OAuth.js +312 -0
  37. package/dist/lib/routes/Users.d.ts +32 -0
  38. package/dist/lib/routes/Users.js +59 -0
  39. package/dist/lib/routes/Webhooks.d.ts +128 -0
  40. package/dist/lib/routes/Webhooks.js +265 -0
  41. package/dist/lib/structures/AnnouncementChannel.d.ts +36 -0
  42. package/dist/lib/structures/AnnouncementChannel.js +47 -0
  43. package/dist/lib/structures/AnnouncementThreadChannel.d.ts +18 -0
  44. package/dist/lib/structures/AnnouncementThreadChannel.js +27 -0
  45. package/dist/lib/structures/Application.d.ts +102 -0
  46. package/dist/lib/structures/Application.js +189 -0
  47. package/dist/lib/structures/ApplicationCommand.d.ts +74 -0
  48. package/dist/lib/structures/ApplicationCommand.js +141 -0
  49. package/dist/lib/structures/Attachment.d.ts +34 -0
  50. package/dist/lib/structures/Attachment.js +64 -0
  51. package/dist/lib/structures/AuditLogEntry.d.ts +25 -0
  52. package/dist/lib/structures/AuditLogEntry.js +53 -0
  53. package/dist/lib/structures/AutoModerationRule.d.ts +49 -0
  54. package/dist/lib/structures/AutoModerationRule.js +139 -0
  55. package/dist/lib/structures/AutocompleteInteraction.d.ts +62 -0
  56. package/dist/lib/structures/AutocompleteInteraction.js +115 -0
  57. package/dist/lib/structures/Base.d.ts +20 -0
  58. package/dist/lib/structures/Base.js +58 -0
  59. package/dist/lib/structures/BaseEntitlement.d.ts +19 -0
  60. package/dist/lib/structures/BaseEntitlement.js +44 -0
  61. package/dist/lib/structures/CategoryChannel.d.ts +41 -0
  62. package/dist/lib/structures/CategoryChannel.js +105 -0
  63. package/dist/lib/structures/Channel.d.ts +20 -0
  64. package/dist/lib/structures/Channel.js +91 -0
  65. package/dist/lib/structures/ClientApplication.d.ts +153 -0
  66. package/dist/lib/structures/ClientApplication.js +220 -0
  67. package/dist/lib/structures/CommandInteraction.d.ts +127 -0
  68. package/dist/lib/structures/CommandInteraction.js +297 -0
  69. package/dist/lib/structures/ComponentInteraction.d.ts +137 -0
  70. package/dist/lib/structures/ComponentInteraction.js +311 -0
  71. package/dist/lib/structures/Entitlement.d.ts +12 -0
  72. package/dist/lib/structures/Entitlement.js +26 -0
  73. package/dist/lib/structures/ExtendedUser.d.ts +26 -0
  74. package/dist/lib/structures/ExtendedUser.js +57 -0
  75. package/dist/lib/structures/ForumChannel.d.ts +11 -0
  76. package/dist/lib/structures/ForumChannel.js +19 -0
  77. package/dist/lib/structures/GroupChannel.d.ts +62 -0
  78. package/dist/lib/structures/GroupChannel.js +133 -0
  79. package/dist/lib/structures/Guild.d.ts +654 -0
  80. package/dist/lib/structures/Guild.js +1319 -0
  81. package/dist/lib/structures/GuildChannel.d.ts +34 -0
  82. package/dist/lib/structures/GuildChannel.js +75 -0
  83. package/dist/lib/structures/GuildPreview.d.ts +50 -0
  84. package/dist/lib/structures/GuildPreview.js +119 -0
  85. package/dist/lib/structures/GuildScheduledEvent.d.ts +60 -0
  86. package/dist/lib/structures/GuildScheduledEvent.js +154 -0
  87. package/dist/lib/structures/GuildTemplate.d.ts +55 -0
  88. package/dist/lib/structures/GuildTemplate.js +126 -0
  89. package/dist/lib/structures/Integration.d.ts +54 -0
  90. package/dist/lib/structures/Integration.js +156 -0
  91. package/dist/lib/structures/Interaction.d.ts +40 -0
  92. package/dist/lib/structures/Interaction.js +90 -0
  93. package/dist/lib/structures/InteractionResolvedChannel.d.ts +28 -0
  94. package/dist/lib/structures/InteractionResolvedChannel.js +45 -0
  95. package/dist/lib/structures/Invite.d.ts +64 -0
  96. package/dist/lib/structures/Invite.js +193 -0
  97. package/dist/lib/structures/InviteGuild.d.ts +52 -0
  98. package/dist/lib/structures/InviteGuild.js +88 -0
  99. package/dist/lib/structures/MediaChannel.d.ts +11 -0
  100. package/dist/lib/structures/MediaChannel.js +19 -0
  101. package/dist/lib/structures/Member.d.ts +122 -0
  102. package/dist/lib/structures/Member.js +255 -0
  103. package/dist/lib/structures/Message.d.ts +194 -0
  104. package/dist/lib/structures/Message.js +477 -0
  105. package/dist/lib/structures/ModalSubmitInteraction.d.ts +128 -0
  106. package/dist/lib/structures/ModalSubmitInteraction.js +240 -0
  107. package/dist/lib/structures/OAuthApplication.d.ts +79 -0
  108. package/dist/lib/structures/OAuthApplication.js +210 -0
  109. package/dist/lib/structures/OAuthGuild.d.ts +35 -0
  110. package/dist/lib/structures/OAuthGuild.js +61 -0
  111. package/dist/lib/structures/PartialApplication.d.ts +30 -0
  112. package/dist/lib/structures/PartialApplication.js +67 -0
  113. package/dist/lib/structures/Permission.d.ts +21 -0
  114. package/dist/lib/structures/Permission.js +68 -0
  115. package/dist/lib/structures/PermissionOverwrite.d.ts +26 -0
  116. package/dist/lib/structures/PermissionOverwrite.js +49 -0
  117. package/dist/lib/structures/PingInteraction.d.ts +16 -0
  118. package/dist/lib/structures/PingInteraction.js +26 -0
  119. package/dist/lib/structures/Poll.d.ts +28 -0
  120. package/dist/lib/structures/Poll.js +78 -0
  121. package/dist/lib/structures/PrivateChannel.d.ts +90 -0
  122. package/dist/lib/structures/PrivateChannel.js +131 -0
  123. package/dist/lib/structures/PrivateThreadChannel.d.ts +18 -0
  124. package/dist/lib/structures/PrivateThreadChannel.js +27 -0
  125. package/dist/lib/structures/PublicThreadChannel.d.ts +21 -0
  126. package/dist/lib/structures/PublicThreadChannel.js +37 -0
  127. package/dist/lib/structures/Role.d.ts +52 -0
  128. package/dist/lib/structures/Role.js +137 -0
  129. package/dist/lib/structures/SKU.d.ts +32 -0
  130. package/dist/lib/structures/SKU.js +53 -0
  131. package/dist/lib/structures/StageChannel.d.ts +33 -0
  132. package/dist/lib/structures/StageChannel.js +44 -0
  133. package/dist/lib/structures/StageInstance.d.ts +36 -0
  134. package/dist/lib/structures/StageInstance.js +94 -0
  135. package/dist/lib/structures/Team.d.ts +22 -0
  136. package/dist/lib/structures/Team.js +67 -0
  137. package/dist/lib/structures/TestEntitlement.d.ts +10 -0
  138. package/dist/lib/structures/TestEntitlement.js +21 -0
  139. package/dist/lib/structures/TextChannel.d.ts +34 -0
  140. package/dist/lib/structures/TextChannel.js +46 -0
  141. package/dist/lib/structures/TextableChannel.d.ts +158 -0
  142. package/dist/lib/structures/TextableChannel.js +276 -0
  143. package/dist/lib/structures/TextableVoiceChannel.d.ts +39 -0
  144. package/dist/lib/structures/TextableVoiceChannel.js +81 -0
  145. package/dist/lib/structures/ThreadChannel.d.ts +159 -0
  146. package/dist/lib/structures/ThreadChannel.js +295 -0
  147. package/dist/lib/structures/ThreadOnlyChannel.d.ts +99 -0
  148. package/dist/lib/structures/ThreadOnlyChannel.js +233 -0
  149. package/dist/lib/structures/ThreadableChannel.d.ts +36 -0
  150. package/dist/lib/structures/ThreadableChannel.js +58 -0
  151. package/dist/lib/structures/UnavailableGuild.d.ts +11 -0
  152. package/dist/lib/structures/UnavailableGuild.js +21 -0
  153. package/dist/lib/structures/User.d.ts +82 -0
  154. package/dist/lib/structures/User.js +168 -0
  155. package/dist/lib/structures/VoiceChannel.d.ts +20 -0
  156. package/dist/lib/structures/VoiceChannel.js +35 -0
  157. package/dist/lib/structures/VoiceState.d.ts +51 -0
  158. package/dist/lib/structures/VoiceState.js +140 -0
  159. package/dist/lib/structures/Webhook.d.ts +129 -0
  160. package/dist/lib/structures/Webhook.js +206 -0
  161. package/dist/lib/types/applications.d.ts +466 -0
  162. package/dist/lib/types/audit-log.d.ts +122 -0
  163. package/dist/lib/types/auto-moderation.d.ts +99 -0
  164. package/dist/lib/types/channels.d.ts +1244 -0
  165. package/dist/lib/types/client.d.ts +228 -0
  166. package/dist/lib/types/events.d.ts +265 -0
  167. package/dist/lib/types/gateway-raw.d.ts +584 -0
  168. package/dist/lib/types/gateway.d.ts +351 -0
  169. package/dist/lib/types/guild-template.d.ts +33 -0
  170. package/dist/lib/types/guilds.d.ts +855 -0
  171. package/dist/lib/types/index.d.ts +18 -0
  172. package/dist/lib/types/interactions.d.ts +377 -0
  173. package/dist/lib/types/json.d.ts +742 -0
  174. package/dist/lib/types/misc.d.ts +28 -0
  175. package/dist/lib/types/oauth.d.ts +201 -0
  176. package/dist/lib/types/request-handler.d.ts +52 -0
  177. package/dist/lib/types/scheduled-events.d.ts +88 -0
  178. package/dist/lib/types/shared.d.ts +9 -0
  179. package/dist/lib/types/users.d.ts +45 -0
  180. package/dist/lib/types/voice.d.ts +45 -0
  181. package/dist/lib/types/webhooks.d.ts +74 -0
  182. package/dist/lib/util/Collection.d.ts +47 -0
  183. package/dist/lib/util/Collection.js +78 -0
  184. package/dist/lib/util/Errors.d.ts +29 -0
  185. package/dist/lib/util/Errors.js +56 -0
  186. package/dist/lib/util/Routes.d.ts +127 -0
  187. package/dist/lib/util/Routes.js +248 -0
  188. package/dist/lib/util/SimpleCollection.d.ts +12 -0
  189. package/dist/lib/util/SimpleCollection.js +81 -0
  190. package/dist/lib/util/TypedCollection.d.ts +24 -0
  191. package/dist/lib/util/TypedCollection.js +76 -0
  192. package/dist/lib/util/TypedEmitter.d.ts +19 -0
  193. package/dist/lib/util/TypedEmitter.js +19 -0
  194. package/dist/lib/util/Util.d.ts +58 -0
  195. package/dist/lib/util/Util.js +535 -0
  196. package/dist/lib/util/interactions/InteractionOptionsWrapper.d.ts +170 -0
  197. package/dist/lib/util/interactions/InteractionOptionsWrapper.js +213 -0
  198. package/dist/lib/util/interactions/MessageInteractionResponse.d.ts +24 -0
  199. package/dist/lib/util/interactions/MessageInteractionResponse.js +28 -0
  200. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.d.ts +24 -0
  201. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.js +34 -0
  202. package/dist/lib/util/interactions/SelectMenuValuesWrapper.d.ts +60 -0
  203. package/dist/lib/util/interactions/SelectMenuValuesWrapper.js +124 -0
  204. package/dist/package.json +1 -1
  205. package/package.json +1 -1
@@ -0,0 +1,742 @@
1
+ /** @module Types/JSON */
2
+ /* eslint-disable @typescript-eslint/no-empty-interface */
3
+ import type { InstallParams } from "./oauth";
4
+ import type { ApplicationCommandOptions, IntegrationTypesConfig, LocaleMap, TeamMember } from "./applications";
5
+ import type {
6
+ ApplicationCommandInteractionData,
7
+ AuthorizingIntegrationOwners,
8
+ AutocompleteInteractionData,
9
+ MessageComponentButtonInteractionData,
10
+ MessageComponentSelectMenuInteractionData,
11
+ ModalSubmitInteractionData
12
+ } from "./interactions";
13
+ import type { AutoModerationAction, TriggerMetadata } from "./auto-moderation";
14
+ import type {
15
+ GuildEmoji,
16
+ IntegrationAccount,
17
+ RawGuild,
18
+ RoleTags,
19
+ RawSticker,
20
+ WelcomeScreen,
21
+ Sticker,
22
+ Presence,
23
+ IncidentActions
24
+ } from "./guilds";
25
+ import type {
26
+ ChannelMention,
27
+ MessageActivity,
28
+ MessageReference,
29
+ RawChannel,
30
+ StickerItem,
31
+ MessageReaction,
32
+ ThreadMetadata,
33
+ PrivateThreadMetadata,
34
+ ForumTag,
35
+ ForumEmoji,
36
+ MessageActionRow,
37
+ Embed,
38
+ GuildChannels,
39
+ TextableGuildChannels,
40
+ ThreadChannels,
41
+ VoiceChannels,
42
+ ThreadOnlyChannels,
43
+ PollQuestion,
44
+ PollResults,
45
+ PollAnswer
46
+ } from "./channels";
47
+ import type { ScheduledEventEntityMetadata } from "./scheduled-events";
48
+ import type {
49
+ ApplicationCommandTypes,
50
+ AutoModerationEventTypes,
51
+ AutoModerationTriggerTypes,
52
+ ChannelTypes,
53
+ DefaultMessageNotificationLevels,
54
+ ExplicitContentFilterLevels,
55
+ GuildFeature,
56
+ GuildNSFWLevels,
57
+ IntegrationExpireBehaviors,
58
+ IntegrationType,
59
+ InteractionTypes,
60
+ InviteTargetTypes,
61
+ MessageTypes,
62
+ MFALevels,
63
+ OverwriteTypes,
64
+ PremiumTiers,
65
+ RESTMethod,
66
+ GuildScheduledEventEntityTypes,
67
+ GuildScheduledEventPrivacyLevels,
68
+ GuildScheduledEventStatuses,
69
+ ThreadAutoArchiveDuration,
70
+ VerificationLevels,
71
+ VideoQualityModes,
72
+ WebhookTypes,
73
+ SortOrderTypes,
74
+ StageInstancePrivacyLevels,
75
+ ForumLayoutTypes,
76
+ EntitlementTypes,
77
+ ApplicationIntegrationTypes,
78
+ InteractionContextTypes,
79
+ PollLayoutType,
80
+ ApplicationDiscoverabilityState,
81
+ ApplicationExplicitContentFilterLevel,
82
+ ApplicationMonetizationState,
83
+ RPCApplicationState,
84
+ StoreApplicationState,
85
+ ApplicationVerificationState
86
+ } from "../Constants";
87
+
88
+ export interface JSONAnnouncementChannel extends JSONThreadableChannel {
89
+ rateLimitPerUser: 0;
90
+ type: ChannelTypes.GUILD_ANNOUNCEMENT;
91
+ }
92
+ export interface JSONAnnouncementThreadChannel extends JSONThreadChannel {
93
+ threadMetadata: ThreadMetadata;
94
+ type: ChannelTypes.ANNOUNCEMENT_THREAD;
95
+ }
96
+ export interface JSONApplication extends JSONClientApplication {
97
+ approximateGuildCount: number;
98
+ botPublic?: boolean;
99
+ botRequireCodeGrant?: boolean;
100
+ coverImage: string | null;
101
+ customInstallURL?: string;
102
+ description: string;
103
+ discoverabilityState?: ApplicationDiscoverabilityState;
104
+ discoveryEligibilityFlags?: number;
105
+ explicitContentFilter?: ApplicationExplicitContentFilterLevel;
106
+ guild: JSONOAuthGuild | null;
107
+ guildID: string | null;
108
+ hook: boolean;
109
+ icon: string | null;
110
+ installParams?: InstallParams;
111
+ integrationTypes: Array<ApplicationIntegrationTypes>;
112
+ integrationTypesConfig: IntegrationTypesConfig;
113
+ interactionsEndpointURL: string | null;
114
+ interactionsEventTypes?: Array<string>;
115
+ interactionsVersion?: number;
116
+ isMonetized: boolean;
117
+ monetizationEligibilityFlags?: number;
118
+ monetizationState?: ApplicationMonetizationState;
119
+ name: string;
120
+ owner: JSONUser | null;
121
+ primarySKUID?: string;
122
+ privacyPolicyURL?: string;
123
+ redirectURIs: Array<string>;
124
+ roleConnectionsVerificationURL: string | null;
125
+ rpcApplicationState?: RPCApplicationState;
126
+ rpcOrigins: Array<string>;
127
+ slug?: string;
128
+ storeApplicationState?: StoreApplicationState;
129
+ tags: Array<string>;
130
+ team: JSONTeam | null;
131
+ termsOfServiceURL?: string;
132
+ type: number | null;
133
+ verificationState?: ApplicationVerificationState;
134
+ verifyKey: string;
135
+ }
136
+ export interface JSONApplicationCommand extends JSONBase {
137
+ applicationID: string;
138
+ contexts: Array<InteractionContextTypes>;
139
+ defaultMemberPermissions?: JSONPermission;
140
+ description: string;
141
+ descriptionLocalizations?: LocaleMap | null;
142
+ dmPermission?: boolean;
143
+ guildID?: string;
144
+ integrationTypes: Array<ApplicationIntegrationTypes>;
145
+ name: string;
146
+ nameLocalizations?: LocaleMap | null;
147
+ nsfw?: boolean;
148
+ options?: Array<ApplicationCommandOptions>;
149
+ type: ApplicationCommandTypes;
150
+ version: string;
151
+ }
152
+ export interface JSONAttachment extends JSONBase {
153
+ contentType?: string;
154
+ description?: string;
155
+ ephemeral?: boolean;
156
+ filename: string;
157
+ flags: number;
158
+ height?: number;
159
+ proxyURL: string;
160
+ size: number;
161
+ url: string;
162
+ width?: number;
163
+ }
164
+ export interface JSONAutocompleteInteraction extends JSONInteraction {
165
+ appPermissions: JSONPermission;
166
+ authorizingIntegrationOwners: AuthorizingIntegrationOwners;
167
+ channelID: string;
168
+ context?: InteractionContextTypes;
169
+ data: AutocompleteInteractionData;
170
+ guildID?: string;
171
+ guildLocale?: string;
172
+ locale: string;
173
+ member?: JSONMember;
174
+ type: InteractionTypes.APPLICATION_COMMAND_AUTOCOMPLETE;
175
+ user: JSONUser;
176
+ }
177
+ export interface JSONAutoModerationRule extends JSONBase {
178
+ actions: Array<AutoModerationAction>;
179
+ creatorID: string;
180
+ enabled: boolean;
181
+ eventType: AutoModerationEventTypes;
182
+ exemptChannels: Array<string>;
183
+ exemptRoles: Array<string>;
184
+ guildID: string;
185
+ name: string;
186
+ triggerMetadata: TriggerMetadata;
187
+ triggerType: AutoModerationTriggerTypes;
188
+ }
189
+ export interface JSONBase {
190
+ createdAt: number;
191
+ id: string;
192
+ }
193
+ export interface JSONBaseEntitlement extends JSONBase {
194
+ applicationID: string;
195
+ consumed: boolean;
196
+ deleted: boolean;
197
+ giftCodeFlags: number;
198
+ guildID: string | null;
199
+ promotionID: string | null;
200
+ skuID: string;
201
+ type: EntitlementTypes;
202
+ userID: string | null;
203
+ }
204
+ export interface JSONCategoryChannel extends JSONGuildChannel {
205
+ channels: Array<string>;
206
+ permissionOverwrites: Array<JSONPermissionOverwrite>;
207
+ position: number;
208
+ type: ChannelTypes.GUILD_CATEGORY;
209
+ }
210
+ export interface JSONChannel extends JSONBase {
211
+ type: ChannelTypes;
212
+ }
213
+ export interface JSONClientApplication extends JSONBase {
214
+ flags: number;
215
+ }
216
+ export interface JSONClientUser extends JSONUser {
217
+ email: string | null;
218
+ flags: number;
219
+ locale: string;
220
+ mfaEnabled: boolean;
221
+ verified: boolean;
222
+ }
223
+ export interface JSONCommandInteraction extends JSONInteraction {
224
+ appPermissions: JSONPermission;
225
+ authorizingIntegrationOwners: AuthorizingIntegrationOwners;
226
+ channelID: string;
227
+ context?: InteractionContextTypes;
228
+ data: ApplicationCommandInteractionData;
229
+ guildID?: string;
230
+ guildLocale?: string;
231
+ locale: string;
232
+ member?: JSONMember;
233
+ type: InteractionTypes.APPLICATION_COMMAND;
234
+ user: JSONUser;
235
+ }
236
+ export interface JSONComponentInteraction extends JSONInteraction {
237
+ appPermissions: JSONPermission;
238
+ authorizingIntegrationOwners: AuthorizingIntegrationOwners;
239
+ channelID: string;
240
+ context?: InteractionContextTypes;
241
+ data: MessageComponentButtonInteractionData | MessageComponentSelectMenuInteractionData;
242
+ guildID?: string;
243
+ guildLocale?: string;
244
+ locale: string;
245
+ member?: JSONMember;
246
+ type: InteractionTypes.MESSAGE_COMPONENT;
247
+ user: JSONUser;
248
+ }
249
+ export interface JSONEntitlement extends JSONBaseEntitlement {
250
+ endsAt: number;
251
+ startsAt: number;
252
+ subscriptionID: string;
253
+ }
254
+ export interface JSONDiscordHTTPError {
255
+ message: string;
256
+ method: RESTMethod;
257
+ name: string;
258
+ resBody: Record<string, unknown> | null;
259
+ stack: string;
260
+ }
261
+ export interface JSONDiscordRESTError {
262
+ message: string;
263
+ method: RESTMethod;
264
+ name: string;
265
+ resBody: Record<string, unknown> | null;
266
+ stack: string;
267
+ }
268
+ export interface JSONExtendedUser extends JSONUser {
269
+ email: string | null;
270
+ flags: number;
271
+ locale?: string;
272
+ mfaEnabled: boolean;
273
+ verified: boolean;
274
+ }
275
+ export interface JSONForumChannel extends JSONThreadOnlyChannel {
276
+ type: ChannelTypes.GUILD_FORUM;
277
+ }
278
+ export interface JSONGroupChannel extends JSONChannel {
279
+ applicationID: string;
280
+ icon: string | null;
281
+ managed: boolean;
282
+ name: string | null;
283
+ nicks: Array<Record<"id" | "nick", string>>;
284
+ ownerID: string;
285
+ recipients: Array<JSONUser>;
286
+ type: ChannelTypes.GROUP_DM;
287
+ }
288
+ export interface JSONGuild extends JSONBase {
289
+ afkChannelID: string | null;
290
+ afkTimeout: number;
291
+ application?: string;
292
+ approximateMemberCount?: number;
293
+ approximatePresenceCount?: number;
294
+ autoModerationRules: Array<JSONAutoModerationRule>;
295
+ banner: string | null;
296
+ channels: Array<string>;
297
+ defaultMessageNotifications: DefaultMessageNotificationLevels;
298
+ description: string | null;
299
+ discoverySplash: string | null;
300
+ emojis: Array<GuildEmoji>;
301
+ explicitContentFilter: ExplicitContentFilterLevels;
302
+ features: Array<GuildFeature>;
303
+ icon: string | null;
304
+ incidentActions: IncidentActions | null;
305
+ joinedAt: number | null;
306
+ large: boolean;
307
+ maxMembers?: number;
308
+ maxPresences?: number;
309
+ maxStageVideoChannelUsers?: number;
310
+ maxVideoChannelUsers?: number;
311
+ memberCount: number;
312
+ members: Array<string>;
313
+ mfaLevel: MFALevels;
314
+ name: string;
315
+ nsfwLevel: GuildNSFWLevels;
316
+ ownerID: string | null;
317
+ preferredLocale: string;
318
+ premiumProgressBarEnabled: boolean;
319
+ premiumSubscriptionCount?: number;
320
+ premiumTier: PremiumTiers;
321
+ publicUpdatesChannelID: string | null;
322
+ region?: string | null;
323
+ roles: Array<JSONRole>;
324
+ rulesChannelID: string | null;
325
+ scheduledEvents: Array<JSONScheduledEvent>;
326
+ splash: string | null;
327
+ stageInstances: Array<JSONStageInstance>;
328
+ stickers?: Array<Sticker>;
329
+ systemChannelFlags: number;
330
+ systemChannelID: string | null;
331
+ threads: Array<string>;
332
+ unavailable: boolean;
333
+ vanityURLCode: string | null;
334
+ verificationLevel: VerificationLevels;
335
+ voiceStates: Array<JSONVoiceState>;
336
+ welcomeScreen?: WelcomeScreen;
337
+ widgetChannelID: string | null;
338
+ widgetEnabled?: boolean;
339
+ }
340
+ export interface JSONGuildChannel extends JSONChannel {
341
+ guildID: string;
342
+ name: string;
343
+ parentID: string | null;
344
+ type: GuildChannels;
345
+ }
346
+ export interface JSONGuildPreview extends JSONBase {
347
+ approximateMemberCount: number;
348
+ approximatePresenceCount: number;
349
+ description: string | null;
350
+ discoverySplash: string | null;
351
+ emojis: Array<GuildEmoji>;
352
+ features: Array<GuildFeature>;
353
+ icon: string | null;
354
+ name: string;
355
+ splash: string | null;
356
+ stickers: Array<RawSticker>;
357
+ }
358
+ export interface JSONGuildTemplate {
359
+ code: string;
360
+ createdAt: number;
361
+ creator: JSONUser;
362
+ description: string | null;
363
+ isDirty: boolean | null;
364
+ name: string;
365
+ serializedSourceGuild: Partial<RawGuild>;
366
+ sourceGuildID: string;
367
+ updatedAt: number;
368
+ usageCount: number;
369
+ }
370
+ export interface JSONIntegration extends JSONBase {
371
+ account: IntegrationAccount;
372
+ application?: JSONPartialApplication;
373
+ enableEmoticons?: boolean;
374
+ enabled?: boolean;
375
+ expireBehavior?: IntegrationExpireBehaviors;
376
+ expireGracePeriod?: number;
377
+ name: string;
378
+ revoked?: boolean;
379
+ roleID: string | null;
380
+ scopes?: Array<string>;
381
+ subscriberCount?: number;
382
+ syncedAt?: number;
383
+ syncing?: boolean;
384
+ type: IntegrationType;
385
+ user?: JSONUser;
386
+ }
387
+ export interface JSONInteraction extends JSONBase {
388
+ applicationID: string;
389
+ type: InteractionTypes;
390
+ version: 1;
391
+ }
392
+ export interface JSONInvite {
393
+ approximateMemberCount?: number;
394
+ approximatePresenceCount?: number;
395
+ channelID?: string;
396
+ code: string;
397
+ createdAt?: number;
398
+ expiresAt?: number;
399
+ guild?: JSONInviteGuild;
400
+ guildID?: string;
401
+ guildScheduledEvent?: JSONScheduledEvent;
402
+ inviter?: string;
403
+ maxAge?: number;
404
+ maxUses?: number;
405
+ stageInstance?: {
406
+ members: Array<string>;
407
+ participantCount: number;
408
+ speakerCount: number;
409
+ topic: string;
410
+ };
411
+ targetApplication?: JSONPartialApplication;
412
+ targetType?: InviteTargetTypes;
413
+ targetUser?: string;
414
+ temporary?: boolean;
415
+ uses?: number;
416
+ }
417
+ export interface JSONInviteGuild extends JSONBase {
418
+ banner: string | null;
419
+ description: string | null;
420
+ features: Array<GuildFeature>;
421
+ icon: string | null;
422
+ name: string;
423
+ nsfwLevel: GuildNSFWLevels;
424
+ premiumSubscriptionCount?: number;
425
+ splash: string | null;
426
+ vanityURLCode: string | null;
427
+ verificationLevel: VerificationLevels;
428
+ }
429
+ export interface JSONMediaChannel extends JSONThreadOnlyChannel {
430
+ type: ChannelTypes.GUILD_MEDIA;
431
+ }
432
+ export interface JSONMember extends JSONBase {
433
+ avatar: string | null;
434
+ communicationDisabledUntil: number | null;
435
+ deaf: boolean;
436
+ flags?: number;
437
+ guildID: string;
438
+ isPending?: boolean;
439
+ joinedAt: number | null;
440
+ mute: boolean;
441
+ nick: string | null;
442
+ pending: boolean;
443
+ premiumSince: number | null;
444
+ presence?: Presence;
445
+ roles: Array<string>;
446
+ user: JSONUser;
447
+ }
448
+ export interface JSONMessage extends JSONBase {
449
+ activity?: MessageActivity;
450
+ applicationID?: string;
451
+ attachments: Array<JSONAttachment>;
452
+ author: JSONUser;
453
+ channelID: string;
454
+ components?: Array<MessageActionRow>;
455
+ content: string;
456
+ editedTimestamp: number | null;
457
+ embeds: Array<Embed>;
458
+ flags?: number;
459
+ guildID?: string;
460
+ interaction?: {
461
+ id: string;
462
+ member?: JSONMember;
463
+ name: string;
464
+ type: InteractionTypes;
465
+ user: JSONUser;
466
+ };
467
+ interactionMetadata?: {
468
+ authorizingIntegrationOwners: AuthorizingIntegrationOwners;
469
+ id: string;
470
+ interactedMessageID?: string;
471
+ name?: string;
472
+ originalResponseMessageID?: string;
473
+ triggeringInteractionMetadata?: {
474
+ authorizingIntegrationOwners: AuthorizingIntegrationOwners;
475
+ id: string;
476
+ interactedMessageID?: string;
477
+ originalResponseMessageID?: string;
478
+ type: InteractionTypes;
479
+ user: JSONUser;
480
+ };
481
+ type: InteractionTypes;
482
+ user: JSONUser;
483
+ };
484
+ mentionChannels?: Array<ChannelMention>;
485
+ mentions: {
486
+ channels: Array<string>;
487
+ everyone: boolean;
488
+ members: Array<JSONMember>;
489
+ roles: Array<string>;
490
+ users: Array<JSONUser>;
491
+ };
492
+ messageReference?: MessageReference;
493
+ nonce?: number | string;
494
+ pinned: boolean;
495
+ position?: number;
496
+ reactions: Array<MessageReaction>;
497
+ referencedMessage?: JSONMessage | null;
498
+ stickerItems?: Array<StickerItem>;
499
+ thread?: JSONAnnouncementThreadChannel | JSONPublicThreadChannel | JSONPrivateThreadChannel;
500
+ timestamp: number;
501
+ tts: boolean;
502
+ type: MessageTypes;
503
+ webhook?: string;
504
+ }
505
+ export interface JSONModalSubmitInteraction extends JSONInteraction {
506
+ appPermissions: JSONPermission;
507
+ authorizingIntegrationOwners: AuthorizingIntegrationOwners;
508
+ channelID: string;
509
+ context?: InteractionContextTypes;
510
+ data: ModalSubmitInteractionData;
511
+ guildID?: string;
512
+ guildLocale?: string;
513
+ locale: string;
514
+ member?: JSONMember;
515
+ type: InteractionTypes.MODAL_SUBMIT;
516
+ user: JSONUser;
517
+ }
518
+ export interface JSONOAuthApplication extends JSONBase {
519
+ botPublic: boolean;
520
+ botRequireCodeGrant: boolean;
521
+ coverImage: string | null;
522
+ customInstallURL?: string;
523
+ description: string;
524
+ flags: number;
525
+ guildID: string | null;
526
+ icon: string | null;
527
+ installParams?: InstallParams;
528
+ integrationTypes: Array<ApplicationIntegrationTypes>;
529
+ integrationTypesConfig?: IntegrationTypesConfig;
530
+ name: string;
531
+ owner: JSONUser;
532
+ ownerID: string;
533
+ primarySKUID?: string;
534
+ privacyPolicyURL?: string;
535
+ roleConnectionsVerificationURL?: string;
536
+ rpcOrigins: Array<string>;
537
+ slug?: string;
538
+ tags?: Array<string>;
539
+ team: JSONTeam | null;
540
+ termsOfServiceURL?: string;
541
+ type: number | null;
542
+ verifyKey: string;
543
+ }
544
+ export interface JSONOAuthGuild extends JSONBase {
545
+ approximateMemberCount?: number;
546
+ approximatePresenceCount?: number;
547
+ features: Array<GuildFeature>;
548
+ icon: string | null;
549
+ name: string;
550
+ owner: boolean;
551
+ permissions: JSONPermission;
552
+ }
553
+ export interface JSONPartialApplication extends JSONBase {
554
+ botPublic?: boolean;
555
+ botRequireCodeGrant?: boolean;
556
+ description: string;
557
+ icon: string | null;
558
+ name: string;
559
+ verifyKey?: string;
560
+ }
561
+ export interface JSONPermission {
562
+ allow: string;
563
+ deny: string;
564
+ }
565
+ export interface JSONPermissionOverwrite extends JSONBase {
566
+ permission: JSONPermission;
567
+ type: OverwriteTypes;
568
+ }
569
+ export interface JSONPingInteraction extends JSONInteraction {
570
+ type: InteractionTypes.PING;
571
+ }
572
+ export interface JSONPoll {
573
+ allowMultiselect: boolean;
574
+ answers: Array<PollAnswer>;
575
+ expiry: string;
576
+ layoutType: PollLayoutType;
577
+ question: PollQuestion;
578
+ results: PollResults;
579
+ }
580
+ export interface JSONPrivateChannel extends JSONChannel {
581
+ lastMessageID: string | null;
582
+ messages: Array<string>;
583
+ recipient: JSONUser;
584
+ type: ChannelTypes.DM;
585
+ }
586
+ export interface JSONPrivateThreadChannel extends JSONThreadChannel {
587
+ threadMetadata: PrivateThreadMetadata;
588
+ type: ChannelTypes.PRIVATE_THREAD;
589
+ }
590
+ export interface JSONPublicThreadChannel extends JSONThreadChannel {
591
+ appliedTags: Array<string>;
592
+ threadMetadata: ThreadMetadata;
593
+ type: ChannelTypes.PUBLIC_THREAD;
594
+ }
595
+ export interface JSONRole extends JSONBase {
596
+ color: number;
597
+ guildID: string;
598
+ hoist: boolean;
599
+ icon: string | null;
600
+ managed: boolean;
601
+ mentionable: boolean;
602
+ name: string;
603
+ permissions: JSONPermission;
604
+ position: number;
605
+ tags: RoleTags;
606
+ unicodeEmoji: string | null;
607
+ }
608
+ export interface JSONScheduledEvent extends JSONBase {
609
+ channelID: string | null;
610
+ creator?: JSONUser;
611
+ description?: string | null;
612
+ entityID: string | null;
613
+ entityMetadata: ScheduledEventEntityMetadata | null;
614
+ entityType: GuildScheduledEventEntityTypes;
615
+ guildID: string;
616
+ image?: string | null;
617
+ name: string;
618
+ privacyLevel: GuildScheduledEventPrivacyLevels;
619
+ scheduledEndTime: number | null;
620
+ scheduledStartTime: number;
621
+ status: GuildScheduledEventStatuses;
622
+ userCount?: number;
623
+ }
624
+ export interface JSONStageChannel extends JSONTextableVoiceChannel {
625
+ type: ChannelTypes.GUILD_STAGE_VOICE;
626
+ }
627
+ export interface JSONStageInstance extends JSONBase {
628
+ channelID: string;
629
+ discoverableDisabled: boolean;
630
+ guildID: string;
631
+ privacyLevel: StageInstancePrivacyLevels;
632
+ scheduledEventID: string | null;
633
+ topic: string;
634
+ }
635
+ export interface JSONTeam extends JSONBase {
636
+ icon: string | null;
637
+ members: Array<TeamMember>;
638
+ name: string;
639
+ ownerID: string;
640
+ }
641
+ export interface JSONTestEntitlement extends JSONBaseEntitlement {}
642
+ export interface JSONTextableChannel extends JSONGuildChannel {
643
+ lastMessageID: string | null;
644
+ messages: Array<string>;
645
+ nsfw: boolean;
646
+ permissionOverwrites: Array<JSONPermissionOverwrite>;
647
+ position: number;
648
+ rateLimitPerUser: number;
649
+ topic: string | null;
650
+ type: TextableGuildChannels;
651
+ }
652
+
653
+ export interface JSONTextableVoiceChannel extends JSONTextableChannel {
654
+ bitrate: number;
655
+ rtcRegion: string | null;
656
+ type: VoiceChannels;
657
+ userLimit: number;
658
+ videoQualityMode: VideoQualityModes;
659
+ voiceMembers: Array<string>;
660
+ }
661
+
662
+ export interface JSONTextChannel extends JSONThreadableChannel {
663
+ type: ChannelTypes.GUILD_TEXT;
664
+ }
665
+ export interface JSONThreadableChannel extends JSONTextableChannel {
666
+ defaultAutoArchiveDuration: ThreadAutoArchiveDuration;
667
+ threads: Array<string>;
668
+ type: ChannelTypes.GUILD_TEXT | ChannelTypes.GUILD_ANNOUNCEMENT;
669
+ }
670
+ export interface JSONThreadChannel extends JSONGuildChannel {
671
+ flags: number;
672
+ lastMessageID: string | null;
673
+ memberCount: number;
674
+ messageCount: number;
675
+ messages: Array<string>;
676
+ ownerID: string;
677
+ rateLimitPerUser: number;
678
+ threadMetadata: ThreadMetadata | PrivateThreadMetadata;
679
+ totalMessageSent: number;
680
+ type: ThreadChannels;
681
+ }
682
+ export interface JSONThreadOnlyChannel extends JSONGuildChannel {
683
+ availableTags: Array<ForumTag>;
684
+ defaultAutoArchiveDuration: ThreadAutoArchiveDuration;
685
+ defaultForumLayout: ForumLayoutTypes;
686
+ defaultReactionEmoji: ForumEmoji | null;
687
+ defaultSortOrder: SortOrderTypes | null;
688
+ defaultThreadRateLimitPerUser: number;
689
+ flags: number;
690
+ lastThreadID: string | null;
691
+ permissionOverwrites: Array<JSONPermissionOverwrite>;
692
+ position: number;
693
+ rateLimitPerUser: number;
694
+ threads: Array<string>;
695
+ topic: string | null;
696
+ type: ThreadOnlyChannels;
697
+ }
698
+ export interface JSONUnavailableGuild extends JSONBase {
699
+ unavailable: true;
700
+ }
701
+ export interface JSONUser extends JSONBase {
702
+ accentColor?: number | null;
703
+ avatar: string | null;
704
+ banner?: string | null;
705
+ bot: boolean;
706
+ discriminator: string;
707
+ globalName: string | null;
708
+ publicFlags: number;
709
+ system: boolean;
710
+ username: string;
711
+ }
712
+ export interface JSONVoiceChannel extends JSONTextableVoiceChannel {
713
+ status: string | null;
714
+ type: ChannelTypes.GUILD_VOICE;
715
+ }
716
+ export interface JSONVoiceState extends JSONBase {
717
+ channelID: string | null;
718
+ deaf: boolean;
719
+ guildID?: string;
720
+ member?: JSONMember;
721
+ mute: boolean;
722
+ requestToSpeakTimestamp: number | null;
723
+ selfDeaf: boolean;
724
+ selfMute: boolean;
725
+ selfStream: boolean;
726
+ selfVideo: boolean;
727
+ sessionID: string;
728
+ suppress: boolean;
729
+ user?: JSONUser;
730
+ }
731
+ export interface JSONWebhook extends JSONBase {
732
+ applicationID: string | null;
733
+ avatar: string | null;
734
+ channelID: string | null;
735
+ guildID: string | null;
736
+ name: string | null;
737
+ sourceChannel?: Pick<RawChannel, "id" | "name">;
738
+ sourceGuild?: Pick<RawGuild, "id" | "name" | "icon">;
739
+ token?: string;
740
+ type: WebhookTypes;
741
+ user?: JSONUser;
742
+ }