@discordjs/core 0.5.0-dev.1680307820-34bc36a.0 → 0.5.0

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.
@@ -0,0 +1,1612 @@
1
+ import { REST, RequestData, RawFile } from '@discordjs/rest';
2
+ import * as discord_api_types_v10 from 'discord-api-types/v10';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTGetAPIChannelWebhooksResult, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPITemplateCreateGuildJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPostAPIChannelWebhookJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetNitroStickerPacksResult, RESTPostAPIGuildForumThreadsJSONBody, APIThreadChannel, RESTPostAPIChannelThreadsJSONBody, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
4
+
5
+ declare class ApplicationCommandsAPI {
6
+ private readonly rest;
7
+ constructor(rest: REST);
8
+ /**
9
+ * Fetches all global commands for a application
10
+ *
11
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
12
+ * @param applicationId - The application id to fetch commands for
13
+ * @param query - The query options to use when fetching commands
14
+ * @param options - The options to use when fetching commands
15
+ */
16
+ getGlobalCommands(applicationId: Snowflake, query?: RESTGetAPIApplicationCommandsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationCommandsResult>;
17
+ /**
18
+ * Creates a new global command
19
+ *
20
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
21
+ * @param applicationId - The application id to create the command for
22
+ * @param body - The data to use when creating the command
23
+ * @param options - The options to use when creating the command
24
+ */
25
+ createGlobalCommand(applicationId: Snowflake, body: RESTPostAPIApplicationCommandsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationCommand>;
26
+ /**
27
+ * Fetches a global command
28
+ *
29
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}
30
+ * @param applicationId - The application id to fetch the command from
31
+ * @param commandId - The command id to fetch
32
+ * @param options - The options to use when fetching the command
33
+ */
34
+ getGlobalCommand(applicationId: Snowflake, commandId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationCommand>;
35
+ /**
36
+ * Edits a global command
37
+ *
38
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
39
+ * @param applicationId - The application id of the command
40
+ * @param commandId - The id of the command to edit
41
+ * @param body - The data to use when editing the command
42
+ * @param options - The options for editing the command
43
+ */
44
+ editGlobalCommand(applicationId: Snowflake, commandId: Snowflake, body: RESTPatchAPIApplicationCommandJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationCommand>;
45
+ /**
46
+ * Deletes a global command
47
+ *
48
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command}
49
+ * @param applicationId - The application id of the command
50
+ * @param commandId - The id of the command to delete
51
+ * @param options - The options for deleting a command
52
+ */
53
+ deleteGlobalCommand(applicationId: Snowflake, commandId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
54
+ /**
55
+ * Overwrites global commands
56
+ *
57
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
58
+ * @param applicationId - The application id to overwrite commands for
59
+ * @param body - The data to use when overwriting commands
60
+ * @param options - The options for overwriting commands
61
+ */
62
+ bulkOverwriteGlobalCommands(applicationId: Snowflake, body: RESTPutAPIApplicationCommandsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationCommandsResult>;
63
+ /**
64
+ * Fetches all commands for a guild
65
+ *
66
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands}
67
+ * @param applicationId - The application id to fetch commands for
68
+ * @param guildId - The guild id to fetch commands for
69
+ * @param query - The data to use when fetching commands
70
+ * @param options - The options to use when fetching commands
71
+ */
72
+ getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationCommandsResult>;
73
+ /**
74
+ * Creates a new command for a guild
75
+ *
76
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
77
+ * @param applicationId - The application id to create the command for
78
+ * @param guildId - The guild id to create the command for
79
+ * @param body - The data to use when creating the command
80
+ * @param options - The options to use when creating the command
81
+ */
82
+ createGuildCommand(applicationId: Snowflake, guildId: Snowflake, body: RESTPostAPIApplicationCommandsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationCommand>;
83
+ /**
84
+ * Fetches a guild command
85
+ *
86
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command}
87
+ * @param applicationId - The application id to fetch the command from
88
+ * @param guildId - The guild id to fetch the command from
89
+ * @param commandId - The command id to fetch
90
+ * @param options - The options to use when fetching the command
91
+ */
92
+ getGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationCommand>;
93
+ /**
94
+ * Edits a guild command
95
+ *
96
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}
97
+ * @param applicationId - The application id of the command
98
+ * @param guildId - The guild id of the command
99
+ * @param commandId - The command id to edit
100
+ * @param body - The data to use when editing the command
101
+ * @param options - The options to use when editing the command
102
+ */
103
+ editGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, body: RESTPatchAPIApplicationCommandJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationCommand>;
104
+ /**
105
+ * Deletes a guild command
106
+ *
107
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command}
108
+ * @param applicationId - The application id of the command
109
+ * @param guildId - The guild id of the command
110
+ * @param commandId - The id of the command to delete
111
+ * @param options - The options for deleting the command
112
+ */
113
+ deleteGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
114
+ /**
115
+ * Bulk overwrites guild commands
116
+ *
117
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
118
+ * @param applicationId - The application id to overwrite commands for
119
+ * @param guildId - The guild id to overwrite commands for
120
+ * @param body - The data to use when overwriting commands
121
+ * @param options - The options to use when overwriting the commands
122
+ */
123
+ bulkOverwriteGuildCommands(applicationId: Snowflake, guildId: Snowflake, body: RESTPutAPIApplicationCommandsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationCommandsResult>;
124
+ /**
125
+ * Fetches the permissions for a guild command
126
+ *
127
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions}
128
+ * @param applicationId - The application id to get the permissions for
129
+ * @param guildId - The guild id of the command
130
+ * @param commandId - The command id to get the permissions for
131
+ * @param options - The option for fetching the command
132
+ */
133
+ getGuildCommandPermissions(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildApplicationCommandPermissions>;
134
+ /**
135
+ * Fetches all permissions for all commands in a guild
136
+ *
137
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}
138
+ * @param applicationId - The application id to get the permissions for
139
+ * @param guildId - The guild id to get the permissions for
140
+ * @param options - The options for fetching permissions
141
+ */
142
+ getGuildCommandsPermissions(applicationId: Snowflake, guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildApplicationCommandsPermissionsResult>;
143
+ /**
144
+ * Edits the permissions for a guild command
145
+ *
146
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}
147
+ * @param userToken - The token of the user to edit permissions on behalf of
148
+ * @param applicationId - The application id to edit the permissions for
149
+ * @param guildId - The guild id to edit the permissions for
150
+ * @param commandId - The id of the command to edit the permissions for
151
+ * @param body - The data to use when editing the permissions
152
+ * @param options - The options to use when editing the permissions
153
+ */
154
+ editGuildCommandPermissions(userToken: string, applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, body: RESTPutAPIApplicationCommandPermissionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildApplicationCommandPermissions>;
155
+ }
156
+
157
+ declare class ChannelsAPI {
158
+ private readonly rest;
159
+ constructor(rest: REST);
160
+ /**
161
+ * Sends a message in a channel
162
+ *
163
+ * @see {@link https://discord.com/developers/docs/resources/channel#create-message}
164
+ * @param channelId - The id of the channel to send the message in
165
+ * @param body - The data to use when sending the message
166
+ * @param options - The options to use when sending the message
167
+ */
168
+ createMessage(channelId: Snowflake, { files, ...body }: RESTPostAPIChannelMessageJSONBody & {
169
+ files?: RawFile[];
170
+ }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
171
+ /**
172
+ * Edits a message
173
+ *
174
+ * @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
175
+ * @param channelId - The id of the channel the message is in
176
+ * @param messageId - The id of the message to edit
177
+ * @param body - The data to use when editing the message
178
+ * @param options - The options to use when editing the message
179
+ */
180
+ editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: RESTPostAPIChannelMessageJSONBody & {
181
+ files?: RawFile[];
182
+ }, { signal }: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
183
+ /**
184
+ * Fetches the reactions for a message
185
+ *
186
+ * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}
187
+ * @param channelId - The id of the channel the message is in
188
+ * @param messageId - The id of the message to get the reactions for
189
+ * @param emoji - The emoji to get the reactions for
190
+ * @param query - The query options to use when fetching the reactions
191
+ * @param options - The options for fetching the message reactions
192
+ */
193
+ getMessageReactions(channelId: Snowflake, messageId: Snowflake, emoji: string, query?: RESTGetAPIChannelMessageReactionUsersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelMessageReactionUsersResult>;
194
+ /**
195
+ * Deletes a reaction for the current user
196
+ *
197
+ * @see {@link https://discord.com/developers/docs/resources/channel#delete-own-reaction}
198
+ * @param channelId - The id of the channel the message is in
199
+ * @param messageId - The id of the message to delete the reaction for
200
+ * @param emoji - The emoji to delete the reaction for
201
+ * @param options - The options for deleting the reaction
202
+ */
203
+ deleteOwnMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
204
+ /**
205
+ * Deletes a reaction for a user
206
+ *
207
+ * @see {@link https://discord.com/developers/docs/resources/channel#delete-user-reaction}
208
+ * @param channelId - The id of the channel the message is in
209
+ * @param messageId - The id of the message to delete the reaction for
210
+ * @param emoji - The emoji to delete the reaction for
211
+ * @param userId - The id of the user to delete the reaction for
212
+ * @param options - The options for deleting the reaction
213
+ */
214
+ deleteUserMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
215
+ /**
216
+ * Deletes all reactions for a message
217
+ *
218
+ * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions}
219
+ * @param channelId - The id of the channel the message is in
220
+ * @param messageId - The id of the message to delete the reactions for
221
+ * @param options - The options for deleting the reactions
222
+ */
223
+ deleteAllMessageReactions(channelId: Snowflake, messageId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
224
+ /**
225
+ * Deletes all reactions of an emoji for a message
226
+ *
227
+ * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji}
228
+ * @param channelId - The id of the channel the message is in
229
+ * @param messageId - The id of the message to delete the reactions for
230
+ * @param emoji - The emoji to delete the reactions for
231
+ * @param options - The options for deleting the reactions
232
+ */
233
+ deleteAllMessageReactionsForEmoji(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
234
+ /**
235
+ * Adds a reaction to a message
236
+ *
237
+ * @see {@link https://discord.com/developers/docs/resources/channel#create-reaction}
238
+ * @param channelId - The id of the channel the message is in
239
+ * @param messageId - The id of the message to add the reaction to
240
+ * @param emoji - The emoji to add the reaction with
241
+ * @param options - The options for adding the reaction
242
+ */
243
+ addMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
244
+ /**
245
+ * Fetches a channel
246
+ *
247
+ * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
248
+ * @param channelId - The id of the channel
249
+ * @param options - The options for fetching the channel
250
+ */
251
+ get(channelId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
252
+ /**
253
+ * Edits a channel
254
+ *
255
+ * @see {@link https://discord.com/developers/docs/resources/channel#modify-channel}
256
+ * @param channelId - The id of the channel to edit
257
+ * @param body - The new channel data
258
+ * @param options - The options for editing the channel
259
+ */
260
+ edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
261
+ /**
262
+ * Deletes a channel
263
+ *
264
+ * @see {@link https://discord.com/developers/docs/resources/channel#deleteclose-channel}
265
+ * @param channelId - The id of the channel to delete
266
+ * @param options - The options for deleting the channel
267
+ */
268
+ delete(channelId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
269
+ /**
270
+ * Fetches the messages of a channel
271
+ *
272
+ * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}
273
+ * @param channelId - The id of the channel to fetch messages from
274
+ * @param query - The query options to use when fetching messages
275
+ * @param options - The options for fetching the messages
276
+ */
277
+ getMessages(channelId: Snowflake, query?: RESTGetAPIChannelMessagesQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelMessagesResult>;
278
+ /**
279
+ * Shows a typing indicator in a channel
280
+ *
281
+ * @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator}
282
+ * @param channelId - The id of the channel to show the typing indicator in
283
+ * @param options - The options for showing the typing indicator
284
+ */
285
+ showTyping(channelId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
286
+ /**
287
+ * Fetches the pinned messages of a channel
288
+ *
289
+ * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
290
+ * @param channelId - The id of the channel to fetch pinned messages from
291
+ * @param options - The options for fetching the pinned messages
292
+ */
293
+ getPins(channelId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelPinsResult>;
294
+ /**
295
+ * Pins a message in a channel
296
+ *
297
+ * @see {@link https://discord.com/developers/docs/resources/channel#pin-message}
298
+ * @param channelId - The id of the channel to pin the message in
299
+ * @param messageId - The id of the message to pin
300
+ * @param options - The options for pinning the message
301
+ */
302
+ pinMessage(channelId: Snowflake, messageId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
303
+ /**
304
+ * Deletes a message
305
+ *
306
+ * @see {@link https://discord.com/developers/docs/resources/channel#delete-message}
307
+ * @param channelId - The id of the channel the message is in
308
+ * @param messageId - The id of the message to delete
309
+ * @param options - The options for deleting the message
310
+ */
311
+ deleteMessage(channelId: Snowflake, messageId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
312
+ /**
313
+ * Bulk deletes messages
314
+ *
315
+ * @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages}
316
+ * @param channelId - The id of the channel the messages are in
317
+ * @param messageIds - The ids of the messages to delete
318
+ * @param options - The options for deleting the messages
319
+ */
320
+ bulkDeleteMessages(channelId: Snowflake, messageIds: Snowflake[], { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
321
+ /**
322
+ * Fetches a message
323
+ *
324
+ * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message}
325
+ * @param channelId - The id of the channel the message is in
326
+ * @param messageId - The id of the message to fetch
327
+ * @param options - The options for fetching the message
328
+ */
329
+ getMessage(channelId: Snowflake, messageId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
330
+ /**
331
+ * Crossposts a message
332
+ *
333
+ * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message}
334
+ * @param channelId - The id of the channel the message is in
335
+ * @param messageId - The id of the message to crosspost
336
+ * @param options - The options for crossposting the message
337
+ */
338
+ crosspostMessage(channelId: Snowflake, messageId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
339
+ /**
340
+ * Unpins a message in a channel
341
+ *
342
+ * @see {@link https://discord.com/developers/docs/resources/channel#unpin-message}
343
+ * @param channelId - The id of the channel to unpin the message in
344
+ * @param messageId - The id of the message to unpin
345
+ * @param options - The options for unpinning the message
346
+ */
347
+ unpinMessage(channelId: Snowflake, messageId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
348
+ /**
349
+ * Follows an announcement channel
350
+ *
351
+ * @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}
352
+ * @param channelId - The id of the announcement channel to follow
353
+ * @param webhookChannelId - The id of the webhook channel to follow the announcements in
354
+ * @param options - The options for following the announcement channel
355
+ */
356
+ followAnnouncements(channelId: Snowflake, webhookChannelId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIFollowedChannel>;
357
+ /**
358
+ * Creates a new invite for a channel
359
+ *
360
+ * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}
361
+ * @param channelId - The id of the channel to create an invite for
362
+ * @param body - The data to use when creating the invite
363
+ * @param options - The options for creating the invite
364
+ */
365
+ createInvite(channelId: Snowflake, body: RESTPostAPIChannelInviteJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIExtendedInvite>;
366
+ /**
367
+ * Fetches the invites of a channel
368
+ *
369
+ * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites}
370
+ * @param channelId - The id of the channel to fetch invites from
371
+ * @param options - The options for fetching the invites
372
+ */
373
+ getInvites(channelId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelInvitesResult>;
374
+ /**
375
+ * Fetches the archived threads of a channel
376
+ *
377
+ * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads}
378
+ * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}
379
+ * @param channelId - The id of the channel to fetch archived threads from
380
+ * @param archivedStatus - The archived status of the threads to fetch
381
+ * @param query - The options to use when fetching archived threads
382
+ * @param options - The options for fetching archived threads
383
+ */
384
+ getArchivedThreads(channelId: Snowflake, archivedStatus: 'private' | 'public', query?: RESTGetAPIChannelThreadsArchivedQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelUsersThreadsArchivedResult>;
385
+ /**
386
+ * Fetches the private joined archived threads of a channel
387
+ *
388
+ * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}
389
+ * @param channelId - The id of the channel to fetch joined archived threads from
390
+ * @param query - The options to use when fetching joined archived threads
391
+ * @param options - The options for fetching joined archived threads
392
+ */
393
+ getJoinedPrivateArchivedThreads(channelId: Snowflake, query?: RESTGetAPIChannelThreadsArchivedQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelUsersThreadsArchivedResult>;
394
+ /**
395
+ * Fetches the webhooks of a channel
396
+ *
397
+ * @see {@link https://discord.com/developers/docs/resources/webhook#get-channel-webhooks}
398
+ * @param id - The id of the channel
399
+ */
400
+ getWebhooks(id: Snowflake): Promise<RESTGetAPIChannelWebhooksResult>;
401
+ }
402
+
403
+ declare class GuildsAPI {
404
+ private readonly rest;
405
+ constructor(rest: REST);
406
+ /**
407
+ * Fetches a guild
408
+ *
409
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
410
+ * @param guildId - The id of the guild
411
+ * @param options - The options for fetching the guild
412
+ */
413
+ get(guildId: string, { signal }: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
414
+ /**
415
+ * Fetches a guild preview
416
+ *
417
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}
418
+ * @param guildId - The id of the guild to fetch the preview from
419
+ * @param options - The options for fetching the guild preview
420
+ */
421
+ getPreview(guildId: Snowflake, { signal }: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildPreview>;
422
+ /**
423
+ * Creates a guild
424
+ *
425
+ * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
426
+ * @param body - The guild to create
427
+ * @param options - The options for creating the guild
428
+ */
429
+ create(body: RESTPostAPIGuildsJSONBody, { signal }: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
430
+ /**
431
+ * Edits a guild
432
+ *
433
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}
434
+ * @param guildId - The id of the guild to edit
435
+ * @param body - The new guild data
436
+ * @param options - The options for editing the guild
437
+ */
438
+ edit(guildId: Snowflake, body: RESTPatchAPIGuildJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuild>;
439
+ /**
440
+ * Deletes a guild
441
+ *
442
+ * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
443
+ * @param guildId - The id of the guild to delete
444
+ * @param options - The options for deleting this guild
445
+ */
446
+ delete(guildId: Snowflake, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
447
+ /**
448
+ * Fetches all the members of a guild
449
+ *
450
+ * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}
451
+ * @param guildId - The id of the guild
452
+ * @param query - The query to use when fetching the guild members
453
+ * @param options - The options for fetching the guild members
454
+ */
455
+ getMembers(guildId: Snowflake, query?: RESTGetAPIGuildMembersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMembersResult>;
456
+ /**
457
+ * Fetches a guild's channels
458
+ *
459
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
460
+ * @param guildId - The id of the guild to fetch the channels from
461
+ * @param options - The options for fetching the guild channels
462
+ */
463
+ getChannels(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildChannelsResult>;
464
+ /**
465
+ * Creates a guild channel
466
+ *
467
+ * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
468
+ * @param guildId - The id of the guild to create the channel in
469
+ * @param body - The data to create the new channel
470
+ * @param options - The options for creating the guild channel
471
+ */
472
+ createChannel(guildId: Snowflake, body: RESTPostAPIGuildChannelJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
473
+ /**
474
+ * Edits a guild channel's positions
475
+ *
476
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions}
477
+ * @param guildId - The id of the guild to edit the channel positions from
478
+ * @param body - The data to edit the channel positions with
479
+ * @param options - The options for editing the guild channel positions
480
+ */
481
+ setChannelPositions(guildId: Snowflake, body: RESTPatchAPIGuildChannelPositionsJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
482
+ /**
483
+ * Fetches the active threads in a guild
484
+ *
485
+ * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads}
486
+ * @param guildId - The id of the guild to fetch the active threads from
487
+ * @param options - The options for fetching the active threads
488
+ */
489
+ getActiveThreads(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIThreadList>;
490
+ /**
491
+ * Fetches a guild member ban
492
+ *
493
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
494
+ * @param guildId - The id of the guild to fetch the ban from
495
+ * @param options - The options for fetching the guild member ban
496
+ */
497
+ getMemberBans(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildBansResult>;
498
+ /**
499
+ * Bans a user from a guild
500
+ *
501
+ * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}
502
+ * @param guildId - The id of the guild to ban the member in
503
+ * @param userId - The id of the user to ban
504
+ * @param body - The payload for banning the user
505
+ * @param options - The options for banning the user
506
+ */
507
+ banUser(guildId: Snowflake, userId: Snowflake, body?: RESTPutAPIGuildBanJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
508
+ /**
509
+ * Unbans a user from a guild
510
+ *
511
+ * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban}
512
+ * @param guildId - The id of the guild to unban the member in
513
+ * @param userId - The id of the user to unban
514
+ * @param options - The options for unbanning the user
515
+ */
516
+ unbanUser(guildId: Snowflake, userId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
517
+ /**
518
+ * Gets all the roles in a guild
519
+ *
520
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}
521
+ * @param guildId - The id of the guild to fetch the roles from
522
+ * @param options - The options for fetching the guild roles
523
+ */
524
+ getRoles(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRolesResult>;
525
+ /**
526
+ * Creates a guild role
527
+ *
528
+ * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}
529
+ * @param guildId - The id of the guild to create the role in
530
+ * @param body - The data to create the role with
531
+ * @param options - The options for creating the guild role
532
+ */
533
+ createRole(guildId: Snowflake, body: RESTPostAPIGuildRoleJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIRole>;
534
+ /**
535
+ * Sets role positions in a guild
536
+ *
537
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}
538
+ * @param guildId - The id of the guild to set role positions for
539
+ * @param body - The data for setting a role position
540
+ * @param options - The options for setting role positions
541
+ */
542
+ setRolePositions(guildId: Snowflake, body: RESTPatchAPIGuildRolePositionsJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPatchAPIGuildRolePositionsResult>;
543
+ /**
544
+ * Edits a guild role
545
+ *
546
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}
547
+ * @param guildId - The id of the guild to edit the role in
548
+ * @param roleId - The id of the role to edit
549
+ * @param body - data for editing the role
550
+ * @param options - The options for editing the guild role
551
+ */
552
+ editRole(guildId: Snowflake, roleId: Snowflake, body: RESTPatchAPIGuildRoleJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIRole>;
553
+ /**
554
+ * Deletes a guild role
555
+ *
556
+ * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role}
557
+ * @param guildId - The id of the guild to delete the role in
558
+ * @param roleId - The id of the role to delete
559
+ * @param options - The options for deleting the guild role
560
+ */
561
+ deleteRole(guildId: Snowflake, roleId: Snowflake, { reason, signal }: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
562
+ /**
563
+ * Edits the multi-factor-authentication (MFA) level of a guild
564
+ *
565
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}
566
+ * @param guildId - The id of the guild to edit the MFA level for
567
+ * @param level - The new MFA level
568
+ * @param options - The options for editing the MFA level
569
+ */
570
+ editMFALevel(guildId: Snowflake, level: GuildMFALevel, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.RESTPostAPIGuildsMFAJSONBody>;
571
+ /**
572
+ * Fetch the number of members that can be pruned from a guild
573
+ *
574
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
575
+ * @param guildId - The id of the guild to fetch the number of pruned members from
576
+ * @param query - The query options for fetching the number of pruned members
577
+ * @param options - The options for fetching the number of pruned members
578
+ */
579
+ getPruneCount(guildId: Snowflake, query?: RESTGetAPIGuildPruneCountQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildPruneCountResult>;
580
+ /**
581
+ * Prunes members in a guild
582
+ *
583
+ * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune}
584
+ * @param guildId - The id of the guild to prune members in
585
+ * @param body - The options for pruning members
586
+ * @param options - The options for initiating the prune
587
+ */
588
+ beginPrune(guildId: Snowflake, body?: RESTPostAPIGuildPruneJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTGetAPIGuildPruneCountResult>;
589
+ /**
590
+ * Fetches voice regions for a guild
591
+ *
592
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}
593
+ * @param guildId - The id of the guild to fetch the voice regions from
594
+ * @param options - The options for fetching the voice regions
595
+ */
596
+ getVoiceRegions(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildVoiceRegionsResult>;
597
+ /**
598
+ * Fetches the invites for a guild
599
+ *
600
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-invites}
601
+ * @param guildId - The id of the guild to fetch the invites from
602
+ * @param options - The options for fetching the invites
603
+ */
604
+ getInvites(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildInvitesResult>;
605
+ /**
606
+ * Fetches the integrations for a guild
607
+ *
608
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations}
609
+ * @param guildId - The id of the guild to fetch the integrations from
610
+ * @param options - The options for fetching the integrations
611
+ */
612
+ getIntegrations(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildIntegrationsResult>;
613
+ /**
614
+ * Deletes an integration from a guild
615
+ *
616
+ * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration}
617
+ * @param guildId - The id of the guild to delete the integration from
618
+ * @param integrationId - The id of the integration to delete
619
+ * @param options - The options for deleting the integration
620
+ */
621
+ deleteIntegration(guildId: Snowflake, integrationId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
622
+ /**
623
+ * Fetches the widget settings for a guild
624
+ *
625
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings}
626
+ * @param guildId - The id of the guild to fetch the widget settings from
627
+ * @param options - The options for fetching the widget settings
628
+ */
629
+ getWidgetSettings(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<ArrayBuffer>;
630
+ /**
631
+ * Edits the widget settings for a guild
632
+ *
633
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}
634
+ * @param guildId - The id of the guild to edit the widget settings from
635
+ * @param body - The new widget settings data
636
+ * @param options - The options for editing the widget settings
637
+ */
638
+ editWidgetSettings(guildId: Snowflake, body: RESTPatchAPIGuildWidgetSettingsJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildWidgetSettings>;
639
+ /**
640
+ * Fetches the widget for a guild
641
+ *
642
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}
643
+ * @param guildId - The id of the guild to fetch the widget from
644
+ * @param options - The options for fetching the widget
645
+ */
646
+ getWidget(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildWidget>;
647
+ /**
648
+ * Fetches the vanity url for a guild
649
+ *
650
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url}
651
+ * @param guildId - The id of the guild to fetch the vanity url from
652
+ * @param options - The options for fetching the vanity url
653
+ */
654
+ getVanityURL(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildVanityUrlResult>;
655
+ /**
656
+ * Fetches the widget image for a guild
657
+ *
658
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image}
659
+ * @param guildId - The id of the guild to fetch the widget image from
660
+ * @param style - The style of the widget image
661
+ * @param options - The options for fetching the widget image
662
+ */
663
+ getWidgetImage(guildId: Snowflake, style?: GuildWidgetStyle, { signal }?: Pick<RequestData, 'signal'>): Promise<ArrayBuffer>;
664
+ /**
665
+ * Fetches the welcome screen for a guild
666
+ *
667
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen}
668
+ * @param guildId - The id of the guild to fetch the welcome screen from
669
+ * @param options - The options for fetching the welcome screen
670
+ */
671
+ getWelcomeScreen(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildWelcomeScreen>;
672
+ /**
673
+ * Edits the welcome screen for a guild
674
+ *
675
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}
676
+ * @param guildId - The id of the guild to edit the welcome screen for
677
+ * @param body - The new welcome screen data
678
+ * @param options - The options for editing the welcome screen
679
+ */
680
+ editWelcomeScreen(guildId: Snowflake, body?: RESTPatchAPIGuildWelcomeScreenJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildWelcomeScreen>;
681
+ /**
682
+ * Edits a user's voice state in a guild
683
+ *
684
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-user-voice-state}
685
+ * @param guildId - The id of the guild to edit the current user's voice state in
686
+ * @param userId - The id of the user to edit the voice state for
687
+ * @param body - The data for editing the voice state
688
+ * @param options - The options for editing the voice state
689
+ */
690
+ editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
691
+ /**
692
+ * Fetches all emojis for a guild
693
+ *
694
+ * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
695
+ * @param guildId - The id of the guild to fetch the emojis from
696
+ * @param options - The options for fetching the emojis
697
+ */
698
+ getEmojis(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildEmojisResult>;
699
+ /**
700
+ * Fetches an emoji for a guild
701
+ *
702
+ * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}
703
+ * @param guildId - The id of the guild to fetch the emoji from
704
+ * @param emojiId - The id of the emoji to fetch
705
+ * @param options - The options for fetching the emoji
706
+ */
707
+ getEmoji(guildId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
708
+ /**
709
+ * Creates a new emoji for a guild
710
+ *
711
+ * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji}
712
+ * @param guildId - The id of the guild to create the emoji from
713
+ * @param body - The data for creating the emoji
714
+ * @param options - The options for creating the emoji
715
+ */
716
+ createEmoji(guildId: Snowflake, body: RESTPostAPIGuildEmojiJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
717
+ /**
718
+ * Edits an emoji for a guild
719
+ *
720
+ * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}
721
+ * @param guildId - The id of the guild to edit the emoji from
722
+ * @param emojiId - The id of the emoji to edit
723
+ * @param body - The data for editing the emoji
724
+ * @param options - The options for editing the emoji
725
+ */
726
+ editEmoji(guildId: Snowflake, emojiId: Snowflake, body: RESTPatchAPIGuildEmojiJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
727
+ /**
728
+ * Deletes an emoji for a guild
729
+ *
730
+ * @see {@link https://discord.com/developers/docs/resources/emoji#delete-guild-emoji}
731
+ * @param guildId - The id of the guild to delete the emoji from
732
+ * @param emojiId - The id of the emoji to delete
733
+ * @param options - The options for deleting the emoji
734
+ */
735
+ deleteEmoji(guildId: Snowflake, emojiId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
736
+ /**
737
+ * Fetches all scheduled events for a guild
738
+ *
739
+ * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}
740
+ * @param guildId - The id of the guild to fetch the scheduled events from
741
+ * @param query - The query options for fetching the scheduled events
742
+ * @param options - The options for fetching the scheduled events
743
+ */
744
+ getScheduledEvents(guildId: Snowflake, query?: RESTGetAPIGuildScheduledEventsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildScheduledEventsResult>;
745
+ /**
746
+ * Creates a new scheduled event for a guild
747
+ *
748
+ * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}
749
+ * @param guildId - The id of the guild to create the scheduled event from
750
+ * @param body - The data to create the event with
751
+ * @param options - The options for creating the scheduled event
752
+ */
753
+ createScheduledEvent(guildId: Snowflake, body: RESTPostAPIGuildScheduledEventJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildScheduledEvent>;
754
+ /**
755
+ * Fetches a scheduled event for a guild
756
+ *
757
+ * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event}
758
+ * @param guildId - The id of the guild to fetch the scheduled event from
759
+ * @param eventId - The id of the scheduled event to fetch
760
+ * @param query - The options for fetching the scheduled event
761
+ * @param options - The options for fetching the scheduled event
762
+ */
763
+ getScheduledEvent(guildId: Snowflake, eventId: Snowflake, query?: RESTGetAPIGuildScheduledEventQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildScheduledEvent>;
764
+ /**
765
+ * Edits a scheduled event for a guild
766
+ *
767
+ * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
768
+ * @param guildId - The id of the guild to edit the scheduled event from
769
+ * @param eventId - The id of the scheduled event to edit
770
+ * @param body - The new event data
771
+ * @param options - The options for editing the scheduled event
772
+ */
773
+ editScheduledEvent(guildId: Snowflake, eventId: Snowflake, body: RESTPatchAPIGuildScheduledEventJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildScheduledEvent>;
774
+ /**
775
+ * Deletes a scheduled event for a guild
776
+ *
777
+ * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event}
778
+ * @param guildId - The id of the guild to delete the scheduled event from
779
+ * @param eventId - The id of the scheduled event to delete
780
+ * @param options - The options for deleting the scheduled event
781
+ */
782
+ deleteScheduledEvent(guildId: Snowflake, eventId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
783
+ /**
784
+ * Gets all users that are interested in a scheduled event
785
+ *
786
+ * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}
787
+ * @param guildId - The id of the guild to fetch the scheduled event users from
788
+ * @param eventId - The id of the scheduled event to fetch the users for
789
+ * @param query - The options for fetching the scheduled event users
790
+ * @param options - The options for fetching the scheduled event users
791
+ */
792
+ getScheduledEventUsers(guildId: Snowflake, eventId: Snowflake, query?: RESTGetAPIGuildScheduledEventUsersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildScheduledEventUsersResult>;
793
+ /**
794
+ * Fetches all the templates for a guild
795
+ *
796
+ * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
797
+ * @param guildId - The id of the guild to fetch the templates from
798
+ * @param options - The options for fetching the templates
799
+ */
800
+ getTemplates(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildTemplatesResult>;
801
+ /**
802
+ * Syncs a template for a guild
803
+ *
804
+ * @see {@link https://discord.com/developers/docs/resources/guild-template#sync-guild-template}
805
+ * @param guildId - The id of the guild to sync the template from
806
+ * @param templateCode - The code of the template to sync
807
+ * @param options - The options for syncing the template
808
+ */
809
+ syncTemplate(guildId: Snowflake, templateCode: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APITemplate>;
810
+ /**
811
+ * Edits a template for a guild
812
+ *
813
+ * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template}
814
+ * @param guildId - The id of the guild to edit the template from
815
+ * @param templateCode - The code of the template to edit
816
+ * @param body - The data for editing the template
817
+ * @param options - The options for editing the template
818
+ */
819
+ editTemplate(guildId: Snowflake, templateCode: string, body: RESTPatchAPIGuildTemplateJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APITemplate>;
820
+ /**
821
+ * Deletes a template for a guild
822
+ *
823
+ * @see {@link https://discord.com/developers/docs/resources/guild-template#delete-guild-template}
824
+ * @param guildId - The id of the guild to delete the template from
825
+ * @param templateCode - The code of the template to delete
826
+ * @param options - The options for deleting the template
827
+ */
828
+ deleteTemplate(guildId: Snowflake, templateCode: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
829
+ /**
830
+ * Fetches all the stickers for a guild
831
+ *
832
+ * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers}
833
+ * @param guildId - The id of the guild to fetch the stickers from
834
+ * @param options - The options for fetching the stickers
835
+ */
836
+ getStickers(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildStickersResult>;
837
+ /**
838
+ * Fetches a sticker for a guild
839
+ *
840
+ * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker}
841
+ * @param guildId - The id of the guild to fetch the sticker from
842
+ * @param stickerId - The id of the sticker to fetch
843
+ * @param options - The options for fetching the sticker
844
+ */
845
+ getSticker(guildId: Snowflake, stickerId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISticker>;
846
+ /**
847
+ * Creates a sticker for a guild
848
+ *
849
+ * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker}
850
+ * @param guildId - The id of the guild to create the sticker for
851
+ * @param body - The data for creating the sticker
852
+ * @param options - The options for creating the sticker
853
+ */
854
+ createSticker(guildId: Snowflake, { file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & {
855
+ file: RawFile;
856
+ }, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
857
+ /**
858
+ * Edits a sticker for a guild
859
+ *
860
+ * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker}
861
+ * @param guildId - The id of the guild to edit the sticker from
862
+ * @param stickerId - The id of the sticker to edit
863
+ * @param body - The data for editing the sticker
864
+ * @param options - The options for editing the sticker
865
+ */
866
+ editSticker(guildId: Snowflake, stickerId: Snowflake, body: RESTPatchAPIGuildStickerJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
867
+ /**
868
+ * Deletes a sticker for a guild
869
+ *
870
+ * @see {@link https://discord.com/developers/docs/resources/sticker#delete-guild-sticker}
871
+ * @param guildId - The id of the guild to delete the sticker from
872
+ * @param stickerId - The id of the sticker to delete
873
+ * @param options - The options for deleting the sticker
874
+ */
875
+ deleteSticker(guildId: Snowflake, stickerId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
876
+ /**
877
+ * Fetches the audit logs for a guild
878
+ *
879
+ * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
880
+ * @param guildId - The id of the guild to fetch the audit logs from
881
+ * @param query - The query options for fetching the audit logs
882
+ * @param options - The options for fetching the audit logs
883
+ */
884
+ getAuditLogs(guildId: Snowflake, query?: RESTGetAPIAuditLogQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIAuditLog>;
885
+ /**
886
+ * Fetches all auto moderation rules for a guild
887
+ *
888
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild}
889
+ * @param guildId - The id of the guild to fetch the auto moderation rules from
890
+ * @param options - The options for fetching the auto moderation rules
891
+ */
892
+ getAutoModerationRules(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIAutoModerationRulesResult>;
893
+ /**
894
+ * Fetches an auto moderation rule for a guild
895
+ *
896
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule}
897
+ * @param guildId - The id of the guild to fetch the auto moderation rule from
898
+ * @param ruleId - The id of the auto moderation rule to fetch
899
+ * @param options - The options for fetching the auto moderation rule
900
+ */
901
+ getAutoModerationRule(guildId: Snowflake, ruleId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIAutoModerationRule>;
902
+ /**
903
+ * Creates a new auto moderation rule for a guild
904
+ *
905
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}
906
+ * @param guildId - The id of the guild to create the auto moderation rule from
907
+ * @param body - The data for creating the auto moderation rule
908
+ * @param options - The options for creating the auto moderation rule
909
+ */
910
+ createAutoModerationRule(guildId: Snowflake, body: RESTPostAPIAutoModerationRuleJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIAutoModerationRule>;
911
+ /**
912
+ * Edits an auto moderation rule for a guild
913
+ *
914
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}
915
+ * @param guildId - The id of the guild to edit the auto moderation rule from
916
+ * @param ruleId - The id of the auto moderation rule to edit
917
+ * @param body - The data for editing the auto moderation rule
918
+ * @param options - The options for editing the auto moderation rule
919
+ */
920
+ editAutoModerationRule(guildId: Snowflake, ruleId: Snowflake, body: RESTPatchAPIAutoModerationRuleJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPatchAPIAutoModerationRuleJSONBody>;
921
+ /**
922
+ * Deletes an auto moderation rule for a guild
923
+ *
924
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule}
925
+ * @param guildId - The id of the guild to delete the auto moderation rule from
926
+ * @param options - The options for deleting the auto moderation rule
927
+ */
928
+ deleteAutoModerationRule(guildId: Snowflake, ruleId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
929
+ /**
930
+ * Fetches a guild member
931
+ *
932
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
933
+ * @param guildId - The id of the guild
934
+ * @param userId - The id of the user
935
+ * @param options - The options for fetching the guild member
936
+ */
937
+ getMember(guildId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildMember>;
938
+ /**
939
+ * Searches for guild members
940
+ *
941
+ * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members}
942
+ * @param guildId - The id of the guild to search in
943
+ * @param query - The query to search for
944
+ * @param options - The options for searching for guild members
945
+ */
946
+ searchForMembers(guildId: Snowflake, query: RESTGetAPIGuildMembersSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMembersSearchResult>;
947
+ /**
948
+ * Edits a guild member
949
+ *
950
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}
951
+ * @param guildId - The id of the guild
952
+ * @param userId - The id of the user
953
+ * @param body - The data to use when editing the guild member
954
+ * @param options - The options for editing the guild member
955
+ */
956
+ editMember(guildId: Snowflake, userId: Snowflake, body?: RESTPatchAPIGuildMemberJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildMember>;
957
+ /**
958
+ * Adds a role to a guild member
959
+ *
960
+ * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}
961
+ * @param guildId - The id of the guild
962
+ * @param userId - The id of the user
963
+ * @param roleId - The id of the role
964
+ * @param options - The options for adding a role to a guild member
965
+ */
966
+ addRoleToMember(guildId: Snowflake, userId: Snowflake, roleId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
967
+ /**
968
+ * Removes a role from a guild member
969
+ *
970
+ * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member-role}
971
+ * @param guildId - The id of the guild
972
+ * @param userId - The id of the user
973
+ * @param roleId - The id of the role
974
+ * @param options - The options for removing a role from a guild member
975
+ */
976
+ removeRoleFromMember(guildId: Snowflake, userId: Snowflake, roleId: Snowflake, { reason, signal }: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
977
+ /**
978
+ * Fetches a guild template
979
+ *
980
+ * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template}
981
+ * @param templateCode - The code of the template
982
+ * @param options - The options for fetching the guild template
983
+ */
984
+ getTemplate(templateCode: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APITemplate>;
985
+ /**
986
+ * Creates a new template
987
+ *
988
+ * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
989
+ * @param templateCode - The code of the template
990
+ * @param body - The data to use when creating the template
991
+ * @param options - The options for creating the template
992
+ */
993
+ createTemplate(templateCode: string, body: RESTPostAPITemplateCreateGuildJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APITemplate>;
994
+ /**
995
+ * Fetches webhooks for a guild
996
+ *
997
+ * @see {@link https://discord.com/developers/docs/resources/webhook#get-guild-webhooks}
998
+ * @param id - The id of the guild
999
+ */
1000
+ getWebhooks(id: Snowflake): Promise<RESTGetAPIGuildWebhooksResult>;
1001
+ /**
1002
+ * Sets the voice state for the current user
1003
+ *
1004
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}
1005
+ * @param guildId - The id of the guild
1006
+ * @param body - The options to use when setting the voice state
1007
+ */
1008
+ setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody): Promise<never>;
1009
+ }
1010
+
1011
+ declare class WebhooksAPI {
1012
+ private readonly rest;
1013
+ constructor(rest: REST);
1014
+ /**
1015
+ * Fetches a webhook
1016
+ *
1017
+ * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook}
1018
+ * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token}
1019
+ * @param id - The id of the webhook
1020
+ * @param token - The token of the webhook
1021
+ * @param options - The options to use when fetching the webhook
1022
+ */
1023
+ get(id: Snowflake, token?: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIWebhook>;
1024
+ /**
1025
+ * Creates a new webhook
1026
+ *
1027
+ * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}
1028
+ * @param channelId - The id of the channel to create the webhook in
1029
+ * @param body - The data to use when creating the webhook
1030
+ * @param options - The options to use when creating the webhook
1031
+ */
1032
+ create(channelId: Snowflake, body: RESTPostAPIChannelWebhookJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<never>;
1033
+ /**
1034
+ * Edits a webhook
1035
+ *
1036
+ * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook}
1037
+ * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token}
1038
+ * @param id - The id of the webhook to edit
1039
+ * @param body - The new webhook data
1040
+ * @param options - The options to use when editing the webhook
1041
+ */
1042
+ edit(id: Snowflake, body: RESTPatchAPIWebhookJSONBody, { token, reason, signal }?: Pick<RequestData, 'reason' | 'signal'> & {
1043
+ token?: string | undefined;
1044
+ }): Promise<discord_api_types_v10.APIWebhook>;
1045
+ /**
1046
+ * Deletes a webhook
1047
+ *
1048
+ * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook}
1049
+ * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token}
1050
+ * @param id - The id of the webhook to delete
1051
+ * @param options - The options to use when deleting the webhook
1052
+ */
1053
+ delete(id: Snowflake, { token, reason, signal }?: Pick<RequestData, 'reason' | 'signal'> & {
1054
+ token?: string | undefined;
1055
+ }): Promise<void>;
1056
+ /**
1057
+ * Executes a webhook and returns the created message
1058
+ *
1059
+ * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}
1060
+ * @param id - The id of the webhook
1061
+ * @param token - The token of the webhook
1062
+ * @param body - The data to use when executing the webhook
1063
+ * @param options - The options to use when executing the webhook
1064
+ */
1065
+ execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1066
+ files?: RawFile[];
1067
+ wait: true;
1068
+ }, { signal }: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1069
+ /**
1070
+ * Executes a webhook
1071
+ *
1072
+ * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}
1073
+ * @param id - The id of the webhook
1074
+ * @param token - The token of the webhook
1075
+ * @param body - The data to use when executing the webhook
1076
+ * @param options - The options to use when executing the webhook
1077
+ */
1078
+ execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1079
+ files?: RawFile[];
1080
+ wait?: false;
1081
+ }, { signal }: Pick<RequestData, 'signal'>): Promise<void>;
1082
+ /**
1083
+ * Executes a slack webhook
1084
+ *
1085
+ * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook}
1086
+ * @param id - The id of the webhook
1087
+ * @param token - The token of the webhook
1088
+ * @param query - The query options to use when executing the webhook
1089
+ * @param options - The options to use when executing the webhook
1090
+ */
1091
+ executeSlack(id: Snowflake, token: string, body: unknown, query?: RESTPostAPIWebhookWithTokenSlackQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1092
+ /**
1093
+ * Executes a github webhook
1094
+ *
1095
+ * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook}
1096
+ * @param id - The id of the webhook
1097
+ * @param token - The token of the webhook
1098
+ * @param query - The options to use when executing the webhook
1099
+ * @param options - The options to use when executing the webhook
1100
+ */
1101
+ executeGitHub(id: Snowflake, token: string, body: unknown, query?: RESTPostAPIWebhookWithTokenGitHubQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1102
+ /**
1103
+ * Fetches an associated message from a webhook
1104
+ *
1105
+ * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message}
1106
+ * @param id - The id of the webhook
1107
+ * @param token - The token of the webhook
1108
+ * @param messageId - The id of the message to fetch
1109
+ * @param query - The query options to use when fetching the message
1110
+ * @param options - The options to use when fetching the message
1111
+ */
1112
+ getMessage(id: Snowflake, token: string, messageId: Snowflake, query?: RESTGetAPIWebhookWithTokenMessageQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1113
+ /**
1114
+ * Edits an associated message from a webhook
1115
+ *
1116
+ * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message}
1117
+ * @param id - The id of the webhook
1118
+ * @param token - The token of the webhook
1119
+ * @param messageId - The id of the message to edit
1120
+ * @param body - The data to use when editing the message
1121
+ * @param options - The options to use when editing the message
1122
+ */
1123
+ editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1124
+ thread_id?: string;
1125
+ }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1126
+ /**
1127
+ * Deletes an associated message from a webhook
1128
+ *
1129
+ * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message}
1130
+ * @param id - The id of the webhook
1131
+ * @param token - The token of the webhook
1132
+ * @param messageId - The id of the message to delete
1133
+ * @param query - The options to use when deleting the message
1134
+ * @param options - The options to use when deleting the message
1135
+ */
1136
+ deleteMessage(id: Snowflake, token: string, messageId: Snowflake, query?: {
1137
+ thread_id?: string;
1138
+ }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1139
+ }
1140
+
1141
+ declare class InteractionsAPI {
1142
+ private readonly rest;
1143
+ private readonly webhooks;
1144
+ constructor(rest: REST, webhooks: WebhooksAPI);
1145
+ /**
1146
+ * Replies to an interaction
1147
+ *
1148
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1149
+ * @param interactionId - The id of the interaction
1150
+ * @param interactionToken - The token of the interaction
1151
+ * @param body - The callback data to use when replying
1152
+ * @param options - The options to use when replying
1153
+ */
1154
+ reply(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1155
+ files?: RawFile[];
1156
+ }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1157
+ /**
1158
+ * Defers the reply to an interaction
1159
+ *
1160
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1161
+ * @param interactionId - The id of the interaction
1162
+ * @param interactionToken - The token of the interaction
1163
+ * @param data - The data to use when deferring the reply
1164
+ * @param options - The options to use when deferring
1165
+ */
1166
+ defer(interactionId: Snowflake, interactionToken: string, data: APIInteractionResponseDeferredChannelMessageWithSource['data'], { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1167
+ /**
1168
+ * Defers an update from a message component interaction
1169
+ *
1170
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1171
+ * @param interactionId - The id of the interaction
1172
+ * @param interactionToken - The token of the interaction
1173
+ * @param options - The options to use when deferring
1174
+ */
1175
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1176
+ /**
1177
+ * Reply to a deferred interaction
1178
+ *
1179
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
1180
+ * @param applicationId - The application id of the interaction
1181
+ * @param interactionToken - The token of the interaction
1182
+ * @param body - The callback data to use when replying
1183
+ * @param options - The options to use when replying
1184
+ */
1185
+ followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1186
+ files?: RawFile[];
1187
+ }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1188
+ /**
1189
+ * Edits the initial reply to an interaction
1190
+ *
1191
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}
1192
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
1193
+ * @param applicationId - The application id of the interaction
1194
+ * @param interactionToken - The token of the interaction
1195
+ * @param callbackData - The callback data to use when editing the reply
1196
+ * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1197
+ * @param options - The options to use when editing the reply
1198
+ */
1199
+ editReply(applicationId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & {
1200
+ files?: RawFile[];
1201
+ }, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1202
+ /**
1203
+ * Fetches the initial reply to an interaction
1204
+ *
1205
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}
1206
+ * @param applicationId - The application id of the interaction
1207
+ * @param interactionToken - The token of the interaction
1208
+ * @param options - The options to use when fetching the reply
1209
+ */
1210
+ getOriginalReply(applicationId: Snowflake, interactionToken: string, { signal }: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1211
+ /**
1212
+ * Deletes the initial reply to an interaction
1213
+ *
1214
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response}
1215
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message}
1216
+ * @param applicationId - The application id of the interaction
1217
+ * @param interactionToken - The token of the interaction
1218
+ * @param messageId - The id of the message to delete. If omitted, the original reply will be deleted
1219
+ * @param options - The options to use when deleting the reply
1220
+ */
1221
+ deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1222
+ /**
1223
+ * Updates the the message the component interaction was triggered on
1224
+ *
1225
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1226
+ * @param interactionId - The id of the interaction
1227
+ * @param interactionToken - The token of the interaction
1228
+ * @param callbackData - The callback data to use when updating the interaction
1229
+ * @param options - The options to use when updating the interaction
1230
+ */
1231
+ updateMessage(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1232
+ files?: RawFile[];
1233
+ }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1234
+ /**
1235
+ * Sends an autocomplete response to an interaction
1236
+ *
1237
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1238
+ * @param interactionId - The id of the interaction
1239
+ * @param interactionToken - The token of the interaction
1240
+ * @param callbackData - The callback data for the autocomplete response
1241
+ * @param options - The options to use when sending the autocomplete response
1242
+ */
1243
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1244
+ /**
1245
+ * Sends a modal response to an interaction
1246
+ *
1247
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1248
+ * @param interactionId - The id of the interaction
1249
+ * @param interactionToken - The token of the interaction
1250
+ * @param callbackData - The modal callback data to send
1251
+ * @param options - The options to use when sending the modal
1252
+ */
1253
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1254
+ }
1255
+
1256
+ declare class InvitesAPI {
1257
+ private readonly rest;
1258
+ constructor(rest: REST);
1259
+ /**
1260
+ * Fetches an invite
1261
+ *
1262
+ * @see {@link https://discord.com/developers/docs/resources/invite#get-invite}
1263
+ * @param code - The invite code
1264
+ * @param query - The options to use when fetching the invite
1265
+ * @param options - The options to use when fetching the invite
1266
+ */
1267
+ get(code: string, query?: RESTGetAPIInviteQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIInvite>;
1268
+ /**
1269
+ * Deletes an invite
1270
+ *
1271
+ * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite}
1272
+ * @param code - The invite code
1273
+ * @param options - The options to use when deleting the invite
1274
+ */
1275
+ delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1276
+ }
1277
+
1278
+ declare class OAuth2API {
1279
+ private readonly rest;
1280
+ constructor(rest: REST);
1281
+ /**
1282
+ * Creates an OAuth2 authorization URL given the options
1283
+ *
1284
+ * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-authorization-url-example}
1285
+ * @param options - The options for creating the authorization URL
1286
+ */
1287
+ generateAuthorizationURL(options: RESTOAuth2AuthorizationQuery): string;
1288
+ /**
1289
+ * Performs an OAuth2 token exchange, giving you an access token
1290
+ *
1291
+ * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-exchange-example}
1292
+ * @param body - The body of the token exchange request
1293
+ * @param options - The options for the token exchange request
1294
+ */
1295
+ tokenExchange(body: RESTPostOAuth2AccessTokenURLEncodedData, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPostOAuth2AccessTokenResult>;
1296
+ /**
1297
+ * Refreshes an OAuth2 access token, giving you a new one
1298
+ *
1299
+ * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example}
1300
+ * @param body - The options for the refresh token request
1301
+ * @param options - The options for the refresh token request
1302
+ */
1303
+ refreshToken(body: RESTPostOAuth2RefreshTokenURLEncodedData, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPostOAuth2AccessTokenResult>;
1304
+ /**
1305
+ * Fetches the bearer token for the current application
1306
+ *
1307
+ * @remarks
1308
+ * This is primarily used for testing purposes
1309
+ * @see {@link https://discord.com/developers/docs/topics/oauth2#client-credentials-grant}
1310
+ * @param body - The options for the client credentials grant request
1311
+ * @param options - The options for the client credentials grant request
1312
+ */
1313
+ getToken(body: RESTPostOAuth2ClientCredentialsURLEncodedData, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.RESTOAuth2ImplicitAuthorizationURLFragmentResult>;
1314
+ /**
1315
+ * Fetches the current bot's application information
1316
+ *
1317
+ * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
1318
+ * @param options - The options for the current bot application information request
1319
+ */
1320
+ getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIOAuth2CurrentApplicationResult>;
1321
+ /**
1322
+ * Fetches the current authorization information
1323
+ *
1324
+ * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}
1325
+ * @param options - The options for the current authorization information request
1326
+ */
1327
+ getCurrentAuthorizationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIOAuth2CurrentAuthorizationResult>;
1328
+ }
1329
+
1330
+ declare class RoleConnectionsAPI {
1331
+ private readonly rest;
1332
+ constructor(rest: REST);
1333
+ /**
1334
+ * Gets the role connection metadata records for the application
1335
+ *
1336
+ * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records}
1337
+ * @param applicationId - The id of the application to get role connection metadata records for
1338
+ * @param options - The options to use when fetching the role connection metadata records
1339
+ */
1340
+ getMetadataRecords(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationRoleConnectionMetadataResult>;
1341
+ /**
1342
+ * Updates the role connection metadata records for the application
1343
+ *
1344
+ * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records}
1345
+ * @param applicationId - The id of the application to update role connection metadata records for
1346
+ * @param body - The new role connection metadata records
1347
+ * @param options - The options to use when updating the role connection metadata records
1348
+ */
1349
+ updateMetadataRecords(applicationId: Snowflake, body: RESTPutAPIApplicationCommandPermissionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;
1350
+ }
1351
+
1352
+ declare class StickersAPI {
1353
+ private readonly rest;
1354
+ constructor(rest: REST);
1355
+ /**
1356
+ * Fetches all of the nitro sticker packs
1357
+ *
1358
+ * @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}
1359
+ * @param options - The options to use when fetching the sticker packs
1360
+ */
1361
+ getNitroStickers({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetNitroStickerPacksResult>;
1362
+ /**
1363
+ * Fetches a sticker
1364
+ *
1365
+ * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker}
1366
+ * @param stickerId - The id of the sticker
1367
+ * @param options - The options to use when fetching the sticker
1368
+ */
1369
+ get(stickerId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISticker>;
1370
+ }
1371
+
1372
+ interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
1373
+ message: RESTPostAPIGuildForumThreadsJSONBody['message'] & {
1374
+ files?: RawFile[];
1375
+ };
1376
+ }
1377
+ declare class ThreadsAPI {
1378
+ private readonly rest;
1379
+ constructor(rest: REST);
1380
+ /**
1381
+ * Fetches a thread
1382
+ *
1383
+ * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
1384
+ * @param threadId - The id of the thread
1385
+ * @param options - The options to use when fetching the thread
1386
+ */
1387
+ get(threadId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<APIThreadChannel>;
1388
+ /**
1389
+ * Creates a new thread
1390
+ *
1391
+ * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
1392
+ * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
1393
+ * @param channelId - The id of the channel to start the thread in
1394
+ * @param body - The data to use when starting the thread
1395
+ * @param messageId - The id of the message to start the thread from
1396
+ * @param options - The options to use when starting the thread
1397
+ */
1398
+ create(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
1399
+ /**
1400
+ * Creates a new forum post
1401
+ *
1402
+ * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel}
1403
+ * @param channelId - The id of the forum channel to start the thread in
1404
+ * @param body - The data to use when starting the thread
1405
+ * @param options - The options to use when starting the thread
1406
+ */
1407
+ createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<APIThreadChannel>;
1408
+ /**
1409
+ * Adds the current user to a thread
1410
+ *
1411
+ * @see {@link https://discord.com/developers/docs/resources/channel#join-thread}
1412
+ * @param threadId - The id of the thread to join
1413
+ * @param options - The options to use when joining the thread
1414
+ */
1415
+ join(threadId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1416
+ /**
1417
+ * Adds a member to a thread
1418
+ *
1419
+ * @see {@link https://discord.com/developers/docs/resources/channel#add-thread-member}
1420
+ * @param threadId - The id of the thread to add the member to
1421
+ * @param userId - The id of the user to add to the thread
1422
+ * @param options - The options to use when adding the member to the thread
1423
+ */
1424
+ addMember(threadId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1425
+ /**
1426
+ * Removes the current user from a thread
1427
+ *
1428
+ * @see {@link https://discord.com/developers/docs/resources/channel#leave-thread}
1429
+ * @param threadId - The id of the thread to leave
1430
+ * @param options - The options to use when leaving the thread
1431
+ */
1432
+ leave(threadId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1433
+ /**
1434
+ * Removes a member from a thread
1435
+ *
1436
+ * @see {@link https://discord.com/developers/docs/resources/channel#remove-thread-member}
1437
+ * @param threadId - The id of the thread to remove the member from
1438
+ * @param userId - The id of the user to remove from the thread
1439
+ * @param options - The options to use when removing the member from the thread
1440
+ */
1441
+ removeMember(threadId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1442
+ /**
1443
+ * Fetches a member of a thread
1444
+ *
1445
+ * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
1446
+ * @param threadId - The id of the thread to fetch the member from
1447
+ * @param userId - The id of the user
1448
+ * @param options - The options to use when fetching the member
1449
+ */
1450
+ getMember(threadId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<APIThreadMember>;
1451
+ /**
1452
+ * Fetches all members of a thread
1453
+ *
1454
+ * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
1455
+ * @param threadId - The id of the thread to fetch the members from
1456
+ * @param options - The options to use when fetching the members
1457
+ */
1458
+ getAllMembers(threadId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelThreadMembersResult>;
1459
+ }
1460
+
1461
+ declare class UsersAPI {
1462
+ private readonly rest;
1463
+ constructor(rest: REST);
1464
+ /**
1465
+ * Fetches a user by their id
1466
+ *
1467
+ * @see {@link https://discord.com/developers/docs/resources/user#get-user}
1468
+ * @param userId - The id of the user to fetch
1469
+ * @param options - The options to use when fetching the user
1470
+ */
1471
+ get(userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIUser>;
1472
+ /**
1473
+ * Returns the user object of the requester's account
1474
+ *
1475
+ * @see {@link https://discord.com/developers/docs/resources/user#get-current-user}
1476
+ * @param options - The options to use when fetching the current user
1477
+ */
1478
+ getCurrent({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIUser>;
1479
+ /**
1480
+ * Returns a list of partial guild objects the current user is a member of
1481
+ *
1482
+ * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds}
1483
+ * @param query - The query options to use when fetching the current user's guilds
1484
+ * @param options - The options to use when fetching the guilds
1485
+ */
1486
+ getGuilds(query?: RESTGetAPICurrentUserGuildsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPICurrentUserGuildsResult>;
1487
+ /**
1488
+ * Leaves the guild with the given id
1489
+ *
1490
+ * @see {@link https://discord.com/developers/docs/resources/user#leave-guild}
1491
+ * @param guildId - The id of the guild
1492
+ * @param options - The options for leaving the guild
1493
+ */
1494
+ leaveGuild(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1495
+ /**
1496
+ * Edits the current user
1497
+ *
1498
+ * @see {@link https://discord.com/developers/docs/resources/user#modify-current-user}
1499
+ * @param body - The new data for the current user
1500
+ * @param options - The options for editing the user
1501
+ */
1502
+ edit(body: RESTPatchAPICurrentUserJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIUser>;
1503
+ /**
1504
+ * Fetches the guild member for the current user
1505
+ *
1506
+ * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member}
1507
+ * @param guildId - The id of the guild
1508
+ * @param options - The options for fetching the guild member
1509
+ */
1510
+ getGuildMember(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildMember>;
1511
+ /**
1512
+ * Edits the guild member for the current user
1513
+ *
1514
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
1515
+ * @param guildId - The id of the guild
1516
+ * @param body - The new data for the guild member
1517
+ * @param options - The options for editing the guild member
1518
+ */
1519
+ editCurrentGuildMember(guildId: Snowflake, body?: RESTPatchAPIGuildMemberJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildMember>;
1520
+ /**
1521
+ * Opens a new DM channel with a user
1522
+ *
1523
+ * @see {@link https://discord.com/developers/docs/resources/user#create-dm}
1524
+ * @param userId - The id of the user to open a DM channel with
1525
+ * @param options - The options for opening the DM
1526
+ */
1527
+ createDM(userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
1528
+ /**
1529
+ * Gets the current user's connections
1530
+ *
1531
+ * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections}
1532
+ * @param options - The options for fetching the user's connections
1533
+ */
1534
+ getConnections({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPICurrentUserConnectionsResult>;
1535
+ /**
1536
+ * Gets the current user's active application role connection
1537
+ *
1538
+ * @see {@link https://discord.com/developers/docs/resources/user#get-user-application-role-connection}
1539
+ * @param applicationId - The id of the application
1540
+ * @param options - The options for fetching the role connections
1541
+ */
1542
+ getApplicationRoleConnection(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationRoleConnection>;
1543
+ /**
1544
+ * Updates the current user's application role connection
1545
+ *
1546
+ * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection}
1547
+ * @param applicationId - The id of the application
1548
+ * @param body - The data to use when updating the application role connection
1549
+ * @param options - The options to use when updating the application role connection
1550
+ */
1551
+ updateApplicationRoleConnection(applicationId: Snowflake, body: RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationRoleConnection>;
1552
+ }
1553
+
1554
+ declare class VoiceAPI {
1555
+ private readonly rest;
1556
+ constructor(rest: REST);
1557
+ /**
1558
+ * Fetches all voice regions
1559
+ *
1560
+ * @see {@link https://discord.com/developers/docs/resources/voice#list-voice-regions}
1561
+ * @param options - The options to use when fetching the voice regions
1562
+ */
1563
+ getVoiceRegions({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIVoiceRegionsResult>;
1564
+ }
1565
+
1566
+ declare class API {
1567
+ readonly rest: REST;
1568
+ readonly applicationCommands: ApplicationCommandsAPI;
1569
+ readonly channels: ChannelsAPI;
1570
+ readonly guilds: GuildsAPI;
1571
+ readonly interactions: InteractionsAPI;
1572
+ readonly invites: InvitesAPI;
1573
+ readonly oauth2: OAuth2API;
1574
+ readonly roleConnections: RoleConnectionsAPI;
1575
+ readonly stickers: StickersAPI;
1576
+ readonly threads: ThreadsAPI;
1577
+ readonly users: UsersAPI;
1578
+ readonly voice: VoiceAPI;
1579
+ readonly webhooks: WebhooksAPI;
1580
+ constructor(rest: REST);
1581
+ }
1582
+
1583
+ interface DescriptiveRawFile extends RawFile {
1584
+ description?: string;
1585
+ }
1586
+ /**
1587
+ * A utility function to create a form data payload given an array of file buffers
1588
+ *
1589
+ * @param files - The files to create a form data payload for
1590
+ * @param options - The additional options for the form data payload
1591
+ */
1592
+ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionResponseCallbackData): {
1593
+ body: {
1594
+ attachments: {
1595
+ id: string;
1596
+ description: string | undefined;
1597
+ }[];
1598
+ content?: string | undefined;
1599
+ tts?: boolean | undefined;
1600
+ embeds?: discord_api_types_v10.APIEmbed[] | undefined;
1601
+ allowed_mentions?: discord_api_types_v10.APIAllowedMentions | undefined;
1602
+ components?: discord_api_types_v10.APIActionRowComponent<discord_api_types_v10.APIMessageActionRowComponent>[] | undefined;
1603
+ flags?: discord_api_types_v10.MessageFlags;
1604
+ thread_name?: string | undefined;
1605
+ };
1606
+ files: {
1607
+ name: string;
1608
+ data: string | number | boolean | Buffer;
1609
+ }[];
1610
+ };
1611
+
1612
+ export { API as A, ChannelsAPI as C, DescriptiveRawFile as D, GuildsAPI as G, InteractionsAPI as I, OAuth2API as O, RoleConnectionsAPI as R, StickersAPI as S, ThreadsAPI as T, UsersAPI as U, VoiceAPI as V, WebhooksAPI as W, ApplicationCommandsAPI as a, InvitesAPI as b, StartForumThreadOptions as c, withFiles as w };