@discordjs/core 1.1.1-dev.1699877032-8d04cbc20 → 1.1.1-dev.1699963457-4b88306dc

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