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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ __export(src_exports, {
36
36
  UsersAPI: () => UsersAPI,
37
37
  VoiceAPI: () => VoiceAPI,
38
38
  WebhooksAPI: () => WebhooksAPI,
39
+ version: () => version,
39
40
  withFiles: () => withFiles
40
41
  });
41
42
  module.exports = __toCommonJS(src_exports);
@@ -52,11 +53,13 @@ var ApplicationCommandsAPI = class {
52
53
  *
53
54
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
54
55
  * @param applicationId - The application id to fetch commands for
56
+ * @param query - The query options to use when fetching commands
55
57
  * @param options - The options to use when fetching commands
56
58
  */
57
- async getGlobalCommands(applicationId, options = {}) {
59
+ async getGlobalCommands(applicationId, query = {}, { signal } = {}) {
58
60
  return this.rest.get(import_v10.Routes.applicationCommands(applicationId), {
59
- query: (0, import_rest.makeURLSearchParams)(options)
61
+ query: (0, import_rest.makeURLSearchParams)(query),
62
+ signal
60
63
  });
61
64
  }
62
65
  /**
@@ -64,11 +67,13 @@ var ApplicationCommandsAPI = class {
64
67
  *
65
68
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
66
69
  * @param applicationId - The application id to create the command for
67
- * @param data - The data to use when creating the command
70
+ * @param body - The data to use when creating the command
71
+ * @param options - The options to use when creating the command
68
72
  */
69
- async createGlobalCommand(applicationId, data) {
73
+ async createGlobalCommand(applicationId, body, { signal } = {}) {
70
74
  return this.rest.post(import_v10.Routes.applicationCommands(applicationId), {
71
- body: data
75
+ body,
76
+ signal
72
77
  });
73
78
  }
74
79
  /**
@@ -77,11 +82,12 @@ var ApplicationCommandsAPI = class {
77
82
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}
78
83
  * @param applicationId - The application id to fetch the command from
79
84
  * @param commandId - The command id to fetch
85
+ * @param options - The options to use when fetching the command
80
86
  */
81
- async getGlobalCommand(applicationId, commandId) {
82
- return this.rest.get(
83
- import_v10.Routes.applicationCommand(applicationId, commandId)
84
- );
87
+ async getGlobalCommand(applicationId, commandId, { signal } = {}) {
88
+ return this.rest.get(import_v10.Routes.applicationCommand(applicationId, commandId), {
89
+ signal
90
+ });
85
91
  }
86
92
  /**
87
93
  * Edits a global command
@@ -89,11 +95,13 @@ var ApplicationCommandsAPI = class {
89
95
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
90
96
  * @param applicationId - The application id of the command
91
97
  * @param commandId - The id of the command to edit
92
- * @param data - The data to use when editing the command
98
+ * @param body - The data to use when editing the command
99
+ * @param options - The options for editing the command
93
100
  */
94
- async editGlobalCommand(applicationId, commandId, data) {
101
+ async editGlobalCommand(applicationId, commandId, body, { signal } = {}) {
95
102
  return this.rest.patch(import_v10.Routes.applicationCommand(applicationId, commandId), {
96
- body: data
103
+ body,
104
+ signal
97
105
  });
98
106
  }
99
107
  /**
@@ -102,20 +110,23 @@ var ApplicationCommandsAPI = class {
102
110
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command}
103
111
  * @param applicationId - The application id of the command
104
112
  * @param commandId - The id of the command to delete
113
+ * @param options - The options for deleting a command
105
114
  */
106
- async deleteGlobalCommand(applicationId, commandId) {
107
- await this.rest.delete(import_v10.Routes.applicationCommand(applicationId, commandId));
115
+ async deleteGlobalCommand(applicationId, commandId, { signal } = {}) {
116
+ await this.rest.delete(import_v10.Routes.applicationCommand(applicationId, commandId), { signal });
108
117
  }
109
118
  /**
110
119
  * Overwrites global commands
111
120
  *
112
121
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
113
122
  * @param applicationId - The application id to overwrite commands for
114
- * @param data - The data to use when overwriting commands
123
+ * @param body - The data to use when overwriting commands
124
+ * @param options - The options for overwriting commands
115
125
  */
116
- async bulkOverwriteGlobalCommands(applicationId, data) {
126
+ async bulkOverwriteGlobalCommands(applicationId, body, { signal } = {}) {
117
127
  return this.rest.put(import_v10.Routes.applicationCommands(applicationId), {
118
- body: data
128
+ body,
129
+ signal
119
130
  });
120
131
  }
121
132
  /**
@@ -124,11 +135,13 @@ var ApplicationCommandsAPI = class {
124
135
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands}
125
136
  * @param applicationId - The application id to fetch commands for
126
137
  * @param guildId - The guild id to fetch commands for
127
- * @param data - The data to use when fetching commands
138
+ * @param query - The data to use when fetching commands
139
+ * @param options - The options to use when fetching commands
128
140
  */
129
- async getGuildCommands(applicationId, guildId, data = {}) {
141
+ async getGuildCommands(applicationId, guildId, query = {}, { signal } = {}) {
130
142
  return this.rest.get(import_v10.Routes.applicationGuildCommands(applicationId, guildId), {
131
- query: (0, import_rest.makeURLSearchParams)(data)
143
+ query: (0, import_rest.makeURLSearchParams)(query),
144
+ signal
132
145
  });
133
146
  }
134
147
  /**
@@ -137,11 +150,13 @@ var ApplicationCommandsAPI = class {
137
150
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
138
151
  * @param applicationId - The application id to create the command for
139
152
  * @param guildId - The guild id to create the command for
140
- * @param data - The data to use when creating the command
153
+ * @param body - The data to use when creating the command
154
+ * @param options - The options to use when creating the command
141
155
  */
142
- async createGuildCommand(applicationId, guildId, data) {
156
+ async createGuildCommand(applicationId, guildId, body, { signal } = {}) {
143
157
  return this.rest.post(import_v10.Routes.applicationGuildCommands(applicationId, guildId), {
144
- body: data
158
+ body,
159
+ signal
145
160
  });
146
161
  }
147
162
  /**
@@ -151,11 +166,12 @@ var ApplicationCommandsAPI = class {
151
166
  * @param applicationId - The application id to fetch the command from
152
167
  * @param guildId - The guild id to fetch the command from
153
168
  * @param commandId - The command id to fetch
169
+ * @param options - The options to use when fetching the command
154
170
  */
155
- async getGuildCommand(applicationId, guildId, commandId) {
156
- return this.rest.get(
157
- import_v10.Routes.applicationGuildCommand(applicationId, guildId, commandId)
158
- );
171
+ async getGuildCommand(applicationId, guildId, commandId, { signal } = {}) {
172
+ return this.rest.get(import_v10.Routes.applicationGuildCommand(applicationId, guildId, commandId), {
173
+ signal
174
+ });
159
175
  }
160
176
  /**
161
177
  * Edits a guild command
@@ -164,11 +180,13 @@ var ApplicationCommandsAPI = class {
164
180
  * @param applicationId - The application id of the command
165
181
  * @param guildId - The guild id of the command
166
182
  * @param commandId - The command id to edit
167
- * @param data - The data to use when editing the command
183
+ * @param body - The data to use when editing the command
184
+ * @param options - The options to use when editing the command
168
185
  */
169
- async editGuildCommand(applicationId, guildId, commandId, data) {
186
+ async editGuildCommand(applicationId, guildId, commandId, body, { signal } = {}) {
170
187
  return this.rest.patch(import_v10.Routes.applicationGuildCommand(applicationId, guildId, commandId), {
171
- body: data
188
+ body,
189
+ signal
172
190
  });
173
191
  }
174
192
  /**
@@ -178,9 +196,10 @@ var ApplicationCommandsAPI = class {
178
196
  * @param applicationId - The application id of the command
179
197
  * @param guildId - The guild id of the command
180
198
  * @param commandId - The id of the command to delete
199
+ * @param options - The options for deleting the command
181
200
  */
182
- async deleteGuildCommand(applicationId, guildId, commandId) {
183
- await this.rest.delete(import_v10.Routes.applicationGuildCommand(applicationId, guildId, commandId));
201
+ async deleteGuildCommand(applicationId, guildId, commandId, { signal } = {}) {
202
+ await this.rest.delete(import_v10.Routes.applicationGuildCommand(applicationId, guildId, commandId), { signal });
184
203
  }
185
204
  /**
186
205
  * Bulk overwrites guild commands
@@ -188,11 +207,13 @@ var ApplicationCommandsAPI = class {
188
207
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
189
208
  * @param applicationId - The application id to overwrite commands for
190
209
  * @param guildId - The guild id to overwrite commands for
191
- * @param data - The data to use when overwriting commands
210
+ * @param body - The data to use when overwriting commands
211
+ * @param options - The options to use when overwriting the commands
192
212
  */
193
- async bulkOverwriteGuildCommands(applicationId, guildId, data) {
213
+ async bulkOverwriteGuildCommands(applicationId, guildId, body, { signal } = {}) {
194
214
  return this.rest.put(import_v10.Routes.applicationGuildCommands(applicationId, guildId), {
195
- body: data
215
+ body,
216
+ signal
196
217
  });
197
218
  }
198
219
  /**
@@ -202,11 +223,12 @@ var ApplicationCommandsAPI = class {
202
223
  * @param applicationId - The application id to get the permissions for
203
224
  * @param guildId - The guild id of the command
204
225
  * @param commandId - The command id to get the permissions for
226
+ * @param options - The option for fetching the command
205
227
  */
206
- async getGuildCommandPermissions(applicationId, guildId, commandId) {
207
- return this.rest.get(
208
- import_v10.Routes.applicationCommandPermissions(applicationId, guildId, commandId)
209
- );
228
+ async getGuildCommandPermissions(applicationId, guildId, commandId, { signal } = {}) {
229
+ return this.rest.get(import_v10.Routes.applicationCommandPermissions(applicationId, guildId, commandId), {
230
+ signal
231
+ });
210
232
  }
211
233
  /**
212
234
  * Fetches all permissions for all commands in a guild
@@ -214,11 +236,12 @@ var ApplicationCommandsAPI = class {
214
236
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}
215
237
  * @param applicationId - The application id to get the permissions for
216
238
  * @param guildId - The guild id to get the permissions for
239
+ * @param options - The options for fetching permissions
217
240
  */
218
- async getGuildCommandsPermissions(applicationId, guildId) {
219
- return this.rest.get(
220
- import_v10.Routes.guildApplicationCommandsPermissions(applicationId, guildId)
221
- );
241
+ async getGuildCommandsPermissions(applicationId, guildId, { signal } = {}) {
242
+ return this.rest.get(import_v10.Routes.guildApplicationCommandsPermissions(applicationId, guildId), {
243
+ signal
244
+ });
222
245
  }
223
246
  /**
224
247
  * Edits the permissions for a guild command
@@ -228,13 +251,15 @@ var ApplicationCommandsAPI = class {
228
251
  * @param applicationId - The application id to edit the permissions for
229
252
  * @param guildId - The guild id to edit the permissions for
230
253
  * @param commandId - The id of the command to edit the permissions for
231
- * @param data - The data to use when editing the permissions
254
+ * @param body - The data to use when editing the permissions
255
+ * @param options - The options to use when editing the permissions
232
256
  */
233
- async editGuildCommandPermissions(userToken, applicationId, guildId, commandId, data) {
257
+ async editGuildCommandPermissions(userToken, applicationId, guildId, commandId, body, { signal } = {}) {
234
258
  return this.rest.put(import_v10.Routes.applicationCommandPermissions(applicationId, guildId, commandId), {
235
259
  headers: { Authorization: `Bearer ${userToken.replace("Bearer ", "")}` },
236
260
  auth: false,
237
- body: data
261
+ body,
262
+ signal
238
263
  });
239
264
  }
240
265
  };
@@ -252,12 +277,14 @@ var ChannelsAPI = class {
252
277
  *
253
278
  * @see {@link https://discord.com/developers/docs/resources/channel#create-message}
254
279
  * @param channelId - The id of the channel to send the message in
255
- * @param data - The data to use when sending the message
280
+ * @param body - The data to use when sending the message
281
+ * @param options - The options to use when sending the message
256
282
  */
257
- async createMessage(channelId, { files, ...body }) {
283
+ async createMessage(channelId, { files, ...body }, { signal } = {}) {
258
284
  return this.rest.post(import_v102.Routes.channelMessages(channelId), {
259
285
  files,
260
- body
286
+ body,
287
+ signal
261
288
  });
262
289
  }
263
290
  /**
@@ -266,12 +293,14 @@ var ChannelsAPI = class {
266
293
  * @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
267
294
  * @param channelId - The id of the channel the message is in
268
295
  * @param messageId - The id of the message to edit
269
- * @param data - The data to use when editing the message
296
+ * @param body - The data to use when editing the message
297
+ * @param options - The options to use when editing the message
270
298
  */
271
- async editMessage(channelId, messageId, { files, ...body }) {
299
+ async editMessage(channelId, messageId, { files, ...body }, { signal }) {
272
300
  return this.rest.patch(import_v102.Routes.channelMessage(channelId, messageId), {
273
301
  files,
274
- body
302
+ body,
303
+ signal
275
304
  });
276
305
  }
277
306
  /**
@@ -281,11 +310,13 @@ var ChannelsAPI = class {
281
310
  * @param channelId - The id of the channel the message is in
282
311
  * @param messageId - The id of the message to get the reactions for
283
312
  * @param emoji - The emoji to get the reactions for
284
- * @param options - The options to use when fetching the reactions
313
+ * @param query - The query options to use when fetching the reactions
314
+ * @param options - The options for fetching the message reactions
285
315
  */
286
- async getMessageReactions(channelId, messageId, emoji, options = {}) {
316
+ async getMessageReactions(channelId, messageId, emoji, query = {}, { signal } = {}) {
287
317
  return this.rest.get(import_v102.Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), {
288
- query: (0, import_rest2.makeURLSearchParams)(options)
318
+ query: (0, import_rest2.makeURLSearchParams)(query),
319
+ signal
289
320
  });
290
321
  }
291
322
  /**
@@ -295,9 +326,12 @@ var ChannelsAPI = class {
295
326
  * @param channelId - The id of the channel the message is in
296
327
  * @param messageId - The id of the message to delete the reaction for
297
328
  * @param emoji - The emoji to delete the reaction for
329
+ * @param options - The options for deleting the reaction
298
330
  */
299
- async deleteOwnMessageReaction(channelId, messageId, emoji) {
300
- await this.rest.delete(import_v102.Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)));
331
+ async deleteOwnMessageReaction(channelId, messageId, emoji, { signal } = {}) {
332
+ await this.rest.delete(import_v102.Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)), {
333
+ signal
334
+ });
301
335
  }
302
336
  /**
303
337
  * Deletes a reaction for a user
@@ -307,9 +341,12 @@ var ChannelsAPI = class {
307
341
  * @param messageId - The id of the message to delete the reaction for
308
342
  * @param emoji - The emoji to delete the reaction for
309
343
  * @param userId - The id of the user to delete the reaction for
344
+ * @param options - The options for deleting the reaction
310
345
  */
311
- async deleteUserMessageReaction(channelId, messageId, emoji, userId) {
312
- await this.rest.delete(import_v102.Routes.channelMessageUserReaction(channelId, messageId, encodeURIComponent(emoji), userId));
346
+ async deleteUserMessageReaction(channelId, messageId, emoji, userId, { signal } = {}) {
347
+ await this.rest.delete(import_v102.Routes.channelMessageUserReaction(channelId, messageId, encodeURIComponent(emoji), userId), {
348
+ signal
349
+ });
313
350
  }
314
351
  /**
315
352
  * Deletes all reactions for a message
@@ -317,9 +354,10 @@ var ChannelsAPI = class {
317
354
  * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions}
318
355
  * @param channelId - The id of the channel the message is in
319
356
  * @param messageId - The id of the message to delete the reactions for
357
+ * @param options - The options for deleting the reactions
320
358
  */
321
- async deleteAllMessageReactions(channelId, messageId) {
322
- await this.rest.delete(import_v102.Routes.channelMessageAllReactions(channelId, messageId));
359
+ async deleteAllMessageReactions(channelId, messageId, { signal } = {}) {
360
+ await this.rest.delete(import_v102.Routes.channelMessageAllReactions(channelId, messageId), { signal });
323
361
  }
324
362
  /**
325
363
  * Deletes all reactions of an emoji for a message
@@ -328,9 +366,10 @@ var ChannelsAPI = class {
328
366
  * @param channelId - The id of the channel the message is in
329
367
  * @param messageId - The id of the message to delete the reactions for
330
368
  * @param emoji - The emoji to delete the reactions for
369
+ * @param options - The options for deleting the reactions
331
370
  */
332
- async deleteAllMessageReactionsForEmoji(channelId, messageId, emoji) {
333
- await this.rest.delete(import_v102.Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)));
371
+ async deleteAllMessageReactionsForEmoji(channelId, messageId, emoji, { signal } = {}) {
372
+ await this.rest.delete(import_v102.Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), { signal });
334
373
  }
335
374
  /**
336
375
  * Adds a reaction to a message
@@ -339,48 +378,54 @@ var ChannelsAPI = class {
339
378
  * @param channelId - The id of the channel the message is in
340
379
  * @param messageId - The id of the message to add the reaction to
341
380
  * @param emoji - The emoji to add the reaction with
381
+ * @param options - The options for adding the reaction
342
382
  */
343
- async addMessageReaction(channelId, messageId, emoji) {
344
- await this.rest.put(import_v102.Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)));
383
+ async addMessageReaction(channelId, messageId, emoji, { signal } = {}) {
384
+ await this.rest.put(import_v102.Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)), { signal });
345
385
  }
346
386
  /**
347
387
  * Fetches a channel
348
388
  *
349
389
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
350
390
  * @param channelId - The id of the channel
391
+ * @param options - The options for fetching the channel
351
392
  */
352
- async get(channelId) {
353
- return this.rest.get(import_v102.Routes.channel(channelId));
393
+ async get(channelId, { signal } = {}) {
394
+ return this.rest.get(import_v102.Routes.channel(channelId), { signal });
354
395
  }
355
396
  /**
356
397
  * Edits a channel
357
398
  *
358
399
  * @see {@link https://discord.com/developers/docs/resources/channel#modify-channel}
359
400
  * @param channelId - The id of the channel to edit
360
- * @param data - The new channel data
401
+ * @param body - The new channel data
402
+ * @param options - The options for editing the channel
361
403
  */
362
- async edit(channelId, data) {
363
- return this.rest.patch(import_v102.Routes.channel(channelId), { body: data });
404
+ async edit(channelId, body, { signal } = {}) {
405
+ return this.rest.patch(import_v102.Routes.channel(channelId), { body, signal });
364
406
  }
365
407
  /**
366
408
  * Deletes a channel
367
409
  *
368
410
  * @see {@link https://discord.com/developers/docs/resources/channel#deleteclose-channel}
369
411
  * @param channelId - The id of the channel to delete
412
+ * @param options - The options for deleting the channel
370
413
  */
371
- async delete(channelId) {
372
- return this.rest.delete(import_v102.Routes.channel(channelId));
414
+ async delete(channelId, { signal } = {}) {
415
+ return this.rest.delete(import_v102.Routes.channel(channelId), { signal });
373
416
  }
374
417
  /**
375
418
  * Fetches the messages of a channel
376
419
  *
377
420
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}
378
421
  * @param channelId - The id of the channel to fetch messages from
379
- * @param options - The options to use when fetching messages
422
+ * @param query - The query options to use when fetching messages
423
+ * @param options - The options for fetching the messages
380
424
  */
381
- async getMessages(channelId, options = {}) {
425
+ async getMessages(channelId, query = {}, { signal } = {}) {
382
426
  return this.rest.get(import_v102.Routes.channelMessages(channelId), {
383
- query: (0, import_rest2.makeURLSearchParams)(options)
427
+ query: (0, import_rest2.makeURLSearchParams)(query),
428
+ signal
384
429
  });
385
430
  }
386
431
  /**
@@ -388,18 +433,20 @@ var ChannelsAPI = class {
388
433
  *
389
434
  * @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator}
390
435
  * @param channelId - The id of the channel to show the typing indicator in
436
+ * @param options - The options for showing the typing indicator
391
437
  */
392
- async showTyping(channelId) {
393
- await this.rest.post(import_v102.Routes.channelTyping(channelId));
438
+ async showTyping(channelId, { signal } = {}) {
439
+ await this.rest.post(import_v102.Routes.channelTyping(channelId), { signal });
394
440
  }
395
441
  /**
396
442
  * Fetches the pinned messages of a channel
397
443
  *
398
444
  * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
399
445
  * @param channelId - The id of the channel to fetch pinned messages from
446
+ * @param options - The options for fetching the pinned messages
400
447
  */
401
- async getPins(channelId) {
402
- return this.rest.get(import_v102.Routes.channelPins(channelId));
448
+ async getPins(channelId, { signal } = {}) {
449
+ return this.rest.get(import_v102.Routes.channelPins(channelId), { signal });
403
450
  }
404
451
  /**
405
452
  * Pins a message in a channel
@@ -407,10 +454,10 @@ var ChannelsAPI = class {
407
454
  * @see {@link https://discord.com/developers/docs/resources/channel#pin-message}
408
455
  * @param channelId - The id of the channel to pin the message in
409
456
  * @param messageId - The id of the message to pin
410
- * @param reason - The reason for pinning the message
457
+ * @param options - The options for pinning the message
411
458
  */
412
- async pinMessage(channelId, messageId, reason) {
413
- await this.rest.put(import_v102.Routes.channelPin(channelId, messageId), { reason });
459
+ async pinMessage(channelId, messageId, { reason, signal } = {}) {
460
+ await this.rest.put(import_v102.Routes.channelPin(channelId, messageId), { reason, signal });
414
461
  }
415
462
  /**
416
463
  * Deletes a message
@@ -418,10 +465,10 @@ var ChannelsAPI = class {
418
465
  * @see {@link https://discord.com/developers/docs/resources/channel#delete-message}
419
466
  * @param channelId - The id of the channel the message is in
420
467
  * @param messageId - The id of the message to delete
421
- * @param reason - The reason for deleting the message
468
+ * @param options - The options for deleting the message
422
469
  */
423
- async deleteMessage(channelId, messageId, reason) {
424
- await this.rest.delete(import_v102.Routes.channelMessage(channelId, messageId), { reason });
470
+ async deleteMessage(channelId, messageId, { reason, signal } = {}) {
471
+ await this.rest.delete(import_v102.Routes.channelMessage(channelId, messageId), { reason, signal });
425
472
  }
426
473
  /**
427
474
  * Bulk deletes messages
@@ -429,9 +476,10 @@ var ChannelsAPI = class {
429
476
  * @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages}
430
477
  * @param channelId - The id of the channel the messages are in
431
478
  * @param messageIds - The ids of the messages to delete
479
+ * @param options - The options for deleting the messages
432
480
  */
433
- async bulkDeleteMessages(channelId, messageIds, reason) {
434
- await this.rest.post(import_v102.Routes.channelBulkDelete(channelId), { reason, body: { messages: messageIds } });
481
+ async bulkDeleteMessages(channelId, messageIds, { reason, signal } = {}) {
482
+ await this.rest.post(import_v102.Routes.channelBulkDelete(channelId), { reason, body: { messages: messageIds }, signal });
435
483
  }
436
484
  /**
437
485
  * Fetches a message
@@ -439,9 +487,12 @@ var ChannelsAPI = class {
439
487
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message}
440
488
  * @param channelId - The id of the channel the message is in
441
489
  * @param messageId - The id of the message to fetch
490
+ * @param options - The options for fetching the message
442
491
  */
443
- async getMessage(channelId, messageId) {
444
- return this.rest.get(import_v102.Routes.channelMessage(channelId, messageId));
492
+ async getMessage(channelId, messageId, { signal } = {}) {
493
+ return this.rest.get(import_v102.Routes.channelMessage(channelId, messageId), {
494
+ signal
495
+ });
445
496
  }
446
497
  /**
447
498
  * Crossposts a message
@@ -449,11 +500,12 @@ var ChannelsAPI = class {
449
500
  * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message}
450
501
  * @param channelId - The id of the channel the message is in
451
502
  * @param messageId - The id of the message to crosspost
503
+ * @param options - The options for crossposting the message
452
504
  */
453
- async crosspostMessage(channelId, messageId) {
454
- return this.rest.post(
455
- import_v102.Routes.channelMessageCrosspost(channelId, messageId)
456
- );
505
+ async crosspostMessage(channelId, messageId, { signal } = {}) {
506
+ return this.rest.post(import_v102.Routes.channelMessageCrosspost(channelId, messageId), {
507
+ signal
508
+ });
457
509
  }
458
510
  /**
459
511
  * Unpins a message in a channel
@@ -461,10 +513,10 @@ var ChannelsAPI = class {
461
513
  * @see {@link https://discord.com/developers/docs/resources/channel#unpin-message}
462
514
  * @param channelId - The id of the channel to unpin the message in
463
515
  * @param messageId - The id of the message to unpin
464
- * @param reason - The reason for unpinning the message
516
+ * @param options - The options for unpinning the message
465
517
  */
466
- async unpinMessage(channelId, messageId, reason) {
467
- await this.rest.delete(import_v102.Routes.channelPin(channelId, messageId), { reason });
518
+ async unpinMessage(channelId, messageId, { reason, signal } = {}) {
519
+ await this.rest.delete(import_v102.Routes.channelPin(channelId, messageId), { reason, signal });
468
520
  }
469
521
  /**
470
522
  * Follows an announcement channel
@@ -472,10 +524,12 @@ var ChannelsAPI = class {
472
524
  * @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}
473
525
  * @param channelId - The id of the announcement channel to follow
474
526
  * @param webhookChannelId - The id of the webhook channel to follow the announcements in
527
+ * @param options - The options for following the announcement channel
475
528
  */
476
- async followAnnouncements(channelId, webhookChannelId) {
529
+ async followAnnouncements(channelId, webhookChannelId, { signal } = {}) {
477
530
  return this.rest.post(import_v102.Routes.channelFollowers(channelId), {
478
- body: { webhook_channel_id: webhookChannelId }
531
+ body: { webhook_channel_id: webhookChannelId },
532
+ signal
479
533
  });
480
534
  }
481
535
  /**
@@ -483,12 +537,14 @@ var ChannelsAPI = class {
483
537
  *
484
538
  * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}
485
539
  * @param channelId - The id of the channel to create an invite for
486
- * @param data - The data to use when creating the invite
540
+ * @param body - The data to use when creating the invite
541
+ * @param options - The options for creating the invite
487
542
  */
488
- async createInvite(channelId, data, reason) {
543
+ async createInvite(channelId, body, { reason, signal } = {}) {
489
544
  return this.rest.post(import_v102.Routes.channelInvites(channelId), {
490
545
  reason,
491
- body: data
546
+ body,
547
+ signal
492
548
  });
493
549
  }
494
550
  /**
@@ -496,9 +552,10 @@ var ChannelsAPI = class {
496
552
  *
497
553
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites}
498
554
  * @param channelId - The id of the channel to fetch invites from
555
+ * @param options - The options for fetching the invites
499
556
  */
500
- async getInvites(channelId) {
501
- return this.rest.get(import_v102.Routes.channelInvites(channelId));
557
+ async getInvites(channelId, { signal } = {}) {
558
+ return this.rest.get(import_v102.Routes.channelInvites(channelId), { signal });
502
559
  }
503
560
  /**
504
561
  * Fetches the archived threads of a channel
@@ -507,11 +564,13 @@ var ChannelsAPI = class {
507
564
  * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}
508
565
  * @param channelId - The id of the channel to fetch archived threads from
509
566
  * @param archivedStatus - The archived status of the threads to fetch
510
- * @param options - The options to use when fetching archived threads
567
+ * @param query - The options to use when fetching archived threads
568
+ * @param options - The options for fetching archived threads
511
569
  */
512
- async getArchivedThreads(channelId, archivedStatus, options = {}) {
570
+ async getArchivedThreads(channelId, archivedStatus, query = {}, { signal } = {}) {
513
571
  return this.rest.get(import_v102.Routes.channelThreads(channelId, archivedStatus), {
514
- query: (0, import_rest2.makeURLSearchParams)(options)
572
+ query: (0, import_rest2.makeURLSearchParams)(query),
573
+ signal
515
574
  });
516
575
  }
517
576
  /**
@@ -519,11 +578,13 @@ var ChannelsAPI = class {
519
578
  *
520
579
  * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}
521
580
  * @param channelId - The id of the channel to fetch joined archived threads from
522
- * @param options - The options to use when fetching joined archived threads
581
+ * @param query - The options to use when fetching joined archived threads
582
+ * @param options - The options for fetching joined archived threads
523
583
  */
524
- async getJoinedPrivateArchivedThreads(channelId, options = {}) {
584
+ async getJoinedPrivateArchivedThreads(channelId, query = {}, { signal } = {}) {
525
585
  return this.rest.get(import_v102.Routes.channelJoinedArchivedThreads(channelId), {
526
- query: (0, import_rest2.makeURLSearchParams)(options)
586
+ query: (0, import_rest2.makeURLSearchParams)(query),
587
+ signal
527
588
  });
528
589
  }
529
590
  /**
@@ -550,59 +611,70 @@ var GuildsAPI = class {
550
611
  *
551
612
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
552
613
  * @param guildId - The id of the guild
614
+ * @param options - The options for fetching the guild
553
615
  */
554
- async get(guildId) {
555
- return this.rest.get(import_v103.Routes.guild(guildId));
616
+ async get(guildId, { signal }) {
617
+ return this.rest.get(import_v103.Routes.guild(guildId), { signal });
556
618
  }
557
619
  /**
558
620
  * Fetches a guild preview
559
621
  *
560
622
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}
561
623
  * @param guildId - The id of the guild to fetch the preview from
624
+ * @param options - The options for fetching the guild preview
562
625
  */
563
- async getPreview(guildId) {
564
- return this.rest.get(import_v103.Routes.guildPreview(guildId));
626
+ async getPreview(guildId, { signal }) {
627
+ return this.rest.get(import_v103.Routes.guildPreview(guildId), {
628
+ signal
629
+ });
565
630
  }
566
631
  /**
567
632
  * Creates a guild
568
633
  *
569
634
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
570
- * @param data - The guild to create
635
+ * @param body - The guild to create
636
+ * @param options - The options for creating the guild
571
637
  */
572
- async create(data) {
573
- return this.rest.post(import_v103.Routes.guilds(), { body: data });
638
+ async create(body, { signal }) {
639
+ return this.rest.post(import_v103.Routes.guilds(), { body, signal });
574
640
  }
575
641
  /**
576
642
  * Edits a guild
577
643
  *
578
644
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}
579
645
  * @param guildId - The id of the guild to edit
580
- * @param data - The new guild data
581
- * @param reason - The reason for editing this guild
646
+ * @param body - The new guild data
647
+ * @param options - The options for editing the guild
582
648
  */
583
- async edit(guildId, data, reason) {
584
- return this.rest.patch(import_v103.Routes.guild(guildId), { reason, body: data });
649
+ async edit(guildId, body, { reason, signal } = {}) {
650
+ return this.rest.patch(import_v103.Routes.guild(guildId), {
651
+ reason,
652
+ body,
653
+ signal
654
+ });
585
655
  }
586
656
  /**
587
657
  * Deletes a guild
588
658
  *
589
659
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
590
660
  * @param guildId - The id of the guild to delete
591
- * @param reason - The reason for deleting this guild
661
+ * @param options - The options for deleting this guild
592
662
  */
593
- async delete(guildId, reason) {
594
- await this.rest.delete(import_v103.Routes.guild(guildId), { reason });
663
+ async delete(guildId, { signal, reason } = {}) {
664
+ await this.rest.delete(import_v103.Routes.guild(guildId), { reason, signal });
595
665
  }
596
666
  /**
597
667
  * Fetches all the members of a guild
598
668
  *
599
669
  * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}
600
670
  * @param guildId - The id of the guild
601
- * @param options - The options to use when fetching the guild members
671
+ * @param query - The query to use when fetching the guild members
672
+ * @param options - The options for fetching the guild members
602
673
  */
603
- async getMembers(guildId, options = {}) {
674
+ async getMembers(guildId, query = {}, { signal } = {}) {
604
675
  return this.rest.get(import_v103.Routes.guildMembers(guildId), {
605
- query: (0, import_rest3.makeURLSearchParams)(options)
676
+ query: (0, import_rest3.makeURLSearchParams)(query),
677
+ signal
606
678
  });
607
679
  }
608
680
  /**
@@ -610,22 +682,26 @@ var GuildsAPI = class {
610
682
  *
611
683
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
612
684
  * @param guildId - The id of the guild to fetch the channels from
685
+ * @param options - The options for fetching the guild channels
613
686
  */
614
- async getChannels(guildId) {
615
- return this.rest.get(import_v103.Routes.guildChannels(guildId));
687
+ async getChannels(guildId, { signal } = {}) {
688
+ return this.rest.get(import_v103.Routes.guildChannels(guildId), {
689
+ signal
690
+ });
616
691
  }
617
692
  /**
618
693
  * Creates a guild channel
619
694
  *
620
695
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
621
696
  * @param guildId - The id of the guild to create the channel in
622
- * @param data - The data to create the new channel
623
- * @param reason - The reason for creating this channel
697
+ * @param body - The data to create the new channel
698
+ * @param options - The options for creating the guild channel
624
699
  */
625
- async createChannel(guildId, data, reason) {
700
+ async createChannel(guildId, body, { reason, signal } = {}) {
626
701
  return this.rest.post(import_v103.Routes.guildChannels(guildId), {
627
702
  reason,
628
- body: data
703
+ body,
704
+ signal
629
705
  });
630
706
  }
631
707
  /**
@@ -633,29 +709,31 @@ var GuildsAPI = class {
633
709
  *
634
710
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions}
635
711
  * @param guildId - The id of the guild to edit the channel positions from
636
- * @param data - The data to edit the channel positions with
637
- * @param reason - The reason for editing the channel positions
712
+ * @param body - The data to edit the channel positions with
713
+ * @param options - The options for editing the guild channel positions
638
714
  */
639
- async setChannelPositions(guildId, data, reason) {
640
- await this.rest.patch(import_v103.Routes.guildChannels(guildId), { reason, body: data });
715
+ async setChannelPositions(guildId, body, { reason, signal } = {}) {
716
+ await this.rest.patch(import_v103.Routes.guildChannels(guildId), { reason, body, signal });
641
717
  }
642
718
  /**
643
719
  * Fetches the active threads in a guild
644
720
  *
645
721
  * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads}
646
722
  * @param guildId - The id of the guild to fetch the active threads from
723
+ * @param options - The options for fetching the active threads
647
724
  */
648
- async getActiveThreads(guildId) {
649
- return this.rest.get(import_v103.Routes.guildActiveThreads(guildId));
725
+ async getActiveThreads(guildId, { signal } = {}) {
726
+ return this.rest.get(import_v103.Routes.guildActiveThreads(guildId), { signal });
650
727
  }
651
728
  /**
652
729
  * Fetches a guild member ban
653
730
  *
654
731
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
655
732
  * @param guildId - The id of the guild to fetch the ban from
733
+ * @param options - The options for fetching the guild member ban
656
734
  */
657
- async getMemberBans(guildId) {
658
- return this.rest.get(import_v103.Routes.guildBans(guildId));
735
+ async getMemberBans(guildId, { signal } = {}) {
736
+ return this.rest.get(import_v103.Routes.guildBans(guildId), { signal });
659
737
  }
660
738
  /**
661
739
  * Bans a user from a guild
@@ -663,11 +741,11 @@ var GuildsAPI = class {
663
741
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}
664
742
  * @param guildId - The id of the guild to ban the member in
665
743
  * @param userId - The id of the user to ban
666
- * @param options - Options for banning the user
667
- * @param reason - The reason for banning the user
744
+ * @param body - The payload for banning the user
745
+ * @param options - The options for banning the user
668
746
  */
669
- async banUser(guildId, userId, options = {}, reason) {
670
- await this.rest.put(import_v103.Routes.guildBan(guildId, userId), { reason, body: options });
747
+ async banUser(guildId, userId, body = {}, { reason, signal } = {}) {
748
+ await this.rest.put(import_v103.Routes.guildBan(guildId, userId), { reason, body, signal });
671
749
  }
672
750
  /**
673
751
  * Unbans a user from a guild
@@ -675,43 +753,45 @@ var GuildsAPI = class {
675
753
  * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban}
676
754
  * @param guildId - The id of the guild to unban the member in
677
755
  * @param userId - The id of the user to unban
678
- * @param reason - The reason for unbanning the user
756
+ * @param options - The options for unbanning the user
679
757
  */
680
- async unbanUser(guildId, userId, reason) {
681
- await this.rest.delete(import_v103.Routes.guildBan(guildId, userId), { reason });
758
+ async unbanUser(guildId, userId, { reason, signal } = {}) {
759
+ await this.rest.delete(import_v103.Routes.guildBan(guildId, userId), { reason, signal });
682
760
  }
683
761
  /**
684
762
  * Gets all the roles in a guild
685
763
  *
686
764
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}
687
765
  * @param guildId - The id of the guild to fetch the roles from
766
+ * @param options - The options for fetching the guild roles
688
767
  */
689
- async getRoles(guildId) {
690
- return this.rest.get(import_v103.Routes.guildRoles(guildId));
768
+ async getRoles(guildId, { signal } = {}) {
769
+ return this.rest.get(import_v103.Routes.guildRoles(guildId), { signal });
691
770
  }
692
771
  /**
693
772
  * Creates a guild role
694
773
  *
695
774
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}
696
775
  * @param guildId - The id of the guild to create the role in
697
- * @param data - The data to create the role with
698
- * @param reason - The reason for creating the role
776
+ * @param body - The data to create the role with
777
+ * @param options - The options for creating the guild role
699
778
  */
700
- async createRole(guildId, data, reason) {
701
- return this.rest.post(import_v103.Routes.guildRoles(guildId), { reason, body: data });
779
+ async createRole(guildId, body, { reason, signal } = {}) {
780
+ return this.rest.post(import_v103.Routes.guildRoles(guildId), { reason, body, signal });
702
781
  }
703
782
  /**
704
783
  * Sets role positions in a guild
705
784
  *
706
785
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}
707
786
  * @param guildId - The id of the guild to set role positions for
708
- * @param data - The data for setting a role position
709
- * @param reason - The reason for setting the role position
787
+ * @param body - The data for setting a role position
788
+ * @param options - The options for setting role positions
710
789
  */
711
- async setRolePositions(guildId, data, reason) {
790
+ async setRolePositions(guildId, body, { reason, signal } = {}) {
712
791
  return this.rest.patch(import_v103.Routes.guildRoles(guildId), {
713
792
  reason,
714
- body: data
793
+ body,
794
+ signal
715
795
  });
716
796
  }
717
797
  /**
@@ -720,13 +800,14 @@ var GuildsAPI = class {
720
800
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}
721
801
  * @param guildId - The id of the guild to edit the role in
722
802
  * @param roleId - The id of the role to edit
723
- * @param data - data for editing the role
724
- * @param reason - The reason for editing the role
803
+ * @param body - data for editing the role
804
+ * @param options - The options for editing the guild role
725
805
  */
726
- async editRole(guildId, roleId, data, reason) {
806
+ async editRole(guildId, roleId, body, { reason, signal } = {}) {
727
807
  return this.rest.patch(import_v103.Routes.guildRole(guildId, roleId), {
728
808
  reason,
729
- body: data
809
+ body,
810
+ signal
730
811
  });
731
812
  }
732
813
  /**
@@ -735,10 +816,10 @@ var GuildsAPI = class {
735
816
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role}
736
817
  * @param guildId - The id of the guild to delete the role in
737
818
  * @param roleId - The id of the role to delete
738
- * @param reason - The reason for deleting the role
819
+ * @param options - The options for deleting the guild role
739
820
  */
740
- async deleteRole(guildId, roleId, reason) {
741
- await this.rest.delete(import_v103.Routes.guildRole(guildId, roleId), { reason });
821
+ async deleteRole(guildId, roleId, { reason, signal }) {
822
+ await this.rest.delete(import_v103.Routes.guildRole(guildId, roleId), { reason, signal });
742
823
  }
743
824
  /**
744
825
  * Edits the multi-factor-authentication (MFA) level of a guild
@@ -746,11 +827,12 @@ var GuildsAPI = class {
746
827
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}
747
828
  * @param guildId - The id of the guild to edit the MFA level for
748
829
  * @param level - The new MFA level
749
- * @param reason - The reason for editing the MFA level
830
+ * @param options - The options for editing the MFA level
750
831
  */
751
- async editMFALevel(guildId, level, reason) {
832
+ async editMFALevel(guildId, level, { reason, signal } = {}) {
752
833
  return this.rest.post(import_v103.Routes.guildMFA(guildId), {
753
834
  reason,
835
+ signal,
754
836
  body: { mfa_level: level }
755
837
  });
756
838
  }
@@ -759,11 +841,13 @@ var GuildsAPI = class {
759
841
  *
760
842
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
761
843
  * @param guildId - The id of the guild to fetch the number of pruned members from
844
+ * @param query - The query options for fetching the number of pruned members
762
845
  * @param options - The options for fetching the number of pruned members
763
846
  */
764
- async getPruneCount(guildId, options = {}) {
847
+ async getPruneCount(guildId, query = {}, { signal } = {}) {
765
848
  return this.rest.get(import_v103.Routes.guildPrune(guildId), {
766
- query: (0, import_rest3.makeURLSearchParams)(options)
849
+ signal,
850
+ query: (0, import_rest3.makeURLSearchParams)(query)
767
851
  });
768
852
  }
769
853
  /**
@@ -771,13 +855,14 @@ var GuildsAPI = class {
771
855
  *
772
856
  * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune}
773
857
  * @param guildId - The id of the guild to prune members in
774
- * @param options - The options for pruning members
775
- * @param reason - The reason for pruning members
858
+ * @param body - The options for pruning members
859
+ * @param options - The options for initiating the prune
776
860
  */
777
- async beginPrune(guildId, options = {}, reason) {
861
+ async beginPrune(guildId, body = {}, { reason, signal } = {}) {
778
862
  return this.rest.post(import_v103.Routes.guildPrune(guildId), {
779
- body: options,
780
- reason
863
+ body,
864
+ reason,
865
+ signal
781
866
  });
782
867
  }
783
868
  /**
@@ -785,27 +870,30 @@ var GuildsAPI = class {
785
870
  *
786
871
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}
787
872
  * @param guildId - The id of the guild to fetch the voice regions from
873
+ * @param options - The options for fetching the voice regions
788
874
  */
789
- async getVoiceRegions(guildId) {
790
- return this.rest.get(import_v103.Routes.guildVoiceRegions(guildId));
875
+ async getVoiceRegions(guildId, { signal } = {}) {
876
+ return this.rest.get(import_v103.Routes.guildVoiceRegions(guildId), { signal });
791
877
  }
792
878
  /**
793
879
  * Fetches the invites for a guild
794
880
  *
795
881
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-invites}
796
882
  * @param guildId - The id of the guild to fetch the invites from
883
+ * @param options - The options for fetching the invites
797
884
  */
798
- async getInvites(guildId) {
799
- return this.rest.get(import_v103.Routes.guildInvites(guildId));
885
+ async getInvites(guildId, { signal } = {}) {
886
+ return this.rest.get(import_v103.Routes.guildInvites(guildId), { signal });
800
887
  }
801
888
  /**
802
889
  * Fetches the integrations for a guild
803
890
  *
804
891
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations}
805
892
  * @param guildId - The id of the guild to fetch the integrations from
893
+ * @param options - The options for fetching the integrations
806
894
  */
807
- async getIntegrations(guildId) {
808
- return this.rest.get(import_v103.Routes.guildIntegrations(guildId));
895
+ async getIntegrations(guildId, { signal } = {}) {
896
+ return this.rest.get(import_v103.Routes.guildIntegrations(guildId), { signal });
809
897
  }
810
898
  /**
811
899
  * Deletes an integration from a guild
@@ -813,32 +901,34 @@ var GuildsAPI = class {
813
901
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration}
814
902
  * @param guildId - The id of the guild to delete the integration from
815
903
  * @param integrationId - The id of the integration to delete
816
- * @param reason - The reason for deleting the integration
904
+ * @param options - The options for deleting the integration
817
905
  */
818
- async deleteIntegration(guildId, integrationId, reason) {
819
- await this.rest.delete(import_v103.Routes.guildIntegration(guildId, integrationId), { reason });
906
+ async deleteIntegration(guildId, integrationId, { reason, signal } = {}) {
907
+ await this.rest.delete(import_v103.Routes.guildIntegration(guildId, integrationId), { reason, signal });
820
908
  }
821
909
  /**
822
910
  * Fetches the widget settings for a guild
823
911
  *
824
912
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings}
825
913
  * @param guildId - The id of the guild to fetch the widget settings from
914
+ * @param options - The options for fetching the widget settings
826
915
  */
827
- async getWidgetSettings(guildId) {
828
- return this.rest.get(import_v103.Routes.guildWidgetSettings(guildId));
916
+ async getWidgetSettings(guildId, { signal } = {}) {
917
+ return this.rest.get(import_v103.Routes.guildWidgetSettings(guildId), { signal });
829
918
  }
830
919
  /**
831
920
  * Edits the widget settings for a guild
832
921
  *
833
922
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}
834
923
  * @param guildId - The id of the guild to edit the widget settings from
835
- * @param data - The new widget settings data
836
- * @param reason - The reason for editing the widget settings
924
+ * @param body - The new widget settings data
925
+ * @param options - The options for editing the widget settings
837
926
  */
838
- async editWidgetSettings(guildId, data, reason) {
927
+ async editWidgetSettings(guildId, body, { reason, signal } = {}) {
839
928
  return this.rest.patch(import_v103.Routes.guildWidgetSettings(guildId), {
840
929
  reason,
841
- body: data
930
+ body,
931
+ signal
842
932
  });
843
933
  }
844
934
  /**
@@ -846,18 +936,20 @@ var GuildsAPI = class {
846
936
  *
847
937
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}
848
938
  * @param guildId - The id of the guild to fetch the widget from
939
+ * @param options - The options for fetching the widget
849
940
  */
850
- async getWidget(guildId) {
851
- return this.rest.get(import_v103.Routes.guildWidgetJSON(guildId));
941
+ async getWidget(guildId, { signal } = {}) {
942
+ return this.rest.get(import_v103.Routes.guildWidgetJSON(guildId), { signal });
852
943
  }
853
944
  /**
854
945
  * Fetches the vanity url for a guild
855
946
  *
856
947
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url}
857
948
  * @param guildId - The id of the guild to fetch the vanity url from
949
+ * @param options - The options for fetching the vanity url
858
950
  */
859
- async getVanityURL(guildId) {
860
- return this.rest.get(import_v103.Routes.guildVanityUrl(guildId));
951
+ async getVanityURL(guildId, { signal } = {}) {
952
+ return this.rest.get(import_v103.Routes.guildVanityUrl(guildId), { signal });
861
953
  }
862
954
  /**
863
955
  * Fetches the widget image for a guild
@@ -865,10 +957,12 @@ var GuildsAPI = class {
865
957
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image}
866
958
  * @param guildId - The id of the guild to fetch the widget image from
867
959
  * @param style - The style of the widget image
960
+ * @param options - The options for fetching the widget image
868
961
  */
869
- async getWidgetImage(guildId, style) {
962
+ async getWidgetImage(guildId, style, { signal } = {}) {
870
963
  return this.rest.get(import_v103.Routes.guildWidgetImage(guildId), {
871
- query: (0, import_rest3.makeURLSearchParams)({ style })
964
+ query: (0, import_rest3.makeURLSearchParams)({ style }),
965
+ signal
872
966
  });
873
967
  }
874
968
  /**
@@ -876,22 +970,24 @@ var GuildsAPI = class {
876
970
  *
877
971
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen}
878
972
  * @param guildId - The id of the guild to fetch the welcome screen from
973
+ * @param options - The options for fetching the welcome screen
879
974
  */
880
- async getWelcomeScreen(guildId) {
881
- return this.rest.get(import_v103.Routes.guildWelcomeScreen(guildId));
975
+ async getWelcomeScreen(guildId, { signal } = {}) {
976
+ return this.rest.get(import_v103.Routes.guildWelcomeScreen(guildId), { signal });
882
977
  }
883
978
  /**
884
979
  * Edits the welcome screen for a guild
885
980
  *
886
981
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}
887
982
  * @param guildId - The id of the guild to edit the welcome screen for
888
- * @param data - The new welcome screen data
889
- * @param reason - The reason for editing the welcome screen
983
+ * @param body - The new welcome screen data
984
+ * @param options - The options for editing the welcome screen
890
985
  */
891
- async editWelcomeScreen(guildId, data, reason) {
986
+ async editWelcomeScreen(guildId, body, { reason, signal } = {}) {
892
987
  return this.rest.patch(import_v103.Routes.guildWelcomeScreen(guildId), {
893
988
  reason,
894
- body: data
989
+ body,
990
+ signal
895
991
  });
896
992
  }
897
993
  /**
@@ -900,20 +996,21 @@ var GuildsAPI = class {
900
996
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-user-voice-state}
901
997
  * @param guildId - The id of the guild to edit the current user's voice state in
902
998
  * @param userId - The id of the user to edit the voice state for
903
- * @param data - The data for editing the voice state
904
- * @param reason - The reason for editing the voice state
999
+ * @param body - The data for editing the voice state
1000
+ * @param options - The options for editing the voice state
905
1001
  */
906
- async editUserVoiceState(guildId, userId, data, reason) {
907
- await this.rest.patch(import_v103.Routes.guildVoiceState(guildId, userId), { reason, body: data });
1002
+ async editUserVoiceState(guildId, userId, body, { reason, signal } = {}) {
1003
+ await this.rest.patch(import_v103.Routes.guildVoiceState(guildId, userId), { reason, body, signal });
908
1004
  }
909
1005
  /**
910
1006
  * Fetches all emojis for a guild
911
1007
  *
912
1008
  * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
913
1009
  * @param guildId - The id of the guild to fetch the emojis from
1010
+ * @param options - The options for fetching the emojis
914
1011
  */
915
- async getEmojis(guildId) {
916
- return this.rest.get(import_v103.Routes.guildEmojis(guildId));
1012
+ async getEmojis(guildId, { signal } = {}) {
1013
+ return this.rest.get(import_v103.Routes.guildEmojis(guildId), { signal });
917
1014
  }
918
1015
  /**
919
1016
  * Fetches an emoji for a guild
@@ -921,22 +1018,24 @@ var GuildsAPI = class {
921
1018
  * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}
922
1019
  * @param guildId - The id of the guild to fetch the emoji from
923
1020
  * @param emojiId - The id of the emoji to fetch
1021
+ * @param options - The options for fetching the emoji
924
1022
  */
925
- async getEmoji(guildId, emojiId) {
926
- return this.rest.get(import_v103.Routes.guildEmoji(guildId, emojiId));
1023
+ async getEmoji(guildId, emojiId, { signal } = {}) {
1024
+ return this.rest.get(import_v103.Routes.guildEmoji(guildId, emojiId), { signal });
927
1025
  }
928
1026
  /**
929
1027
  * Creates a new emoji for a guild
930
1028
  *
931
1029
  * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji}
932
1030
  * @param guildId - The id of the guild to create the emoji from
933
- * @param data - The data for creating the emoji
934
- * @param reason - The reason for creating the emoji
1031
+ * @param body - The data for creating the emoji
1032
+ * @param options - The options for creating the emoji
935
1033
  */
936
- async createEmoji(guildId, data, reason) {
1034
+ async createEmoji(guildId, body, { reason, signal } = {}) {
937
1035
  return this.rest.post(import_v103.Routes.guildEmojis(guildId), {
938
1036
  reason,
939
- body: data
1037
+ body,
1038
+ signal
940
1039
  });
941
1040
  }
942
1041
  /**
@@ -945,13 +1044,14 @@ var GuildsAPI = class {
945
1044
  * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}
946
1045
  * @param guildId - The id of the guild to edit the emoji from
947
1046
  * @param emojiId - The id of the emoji to edit
948
- * @param data - The data for editing the emoji
949
- * @param reason - The reason for editing the emoji
1047
+ * @param body - The data for editing the emoji
1048
+ * @param options - The options for editing the emoji
950
1049
  */
951
- async editEmoji(guildId, emojiId, data, reason) {
1050
+ async editEmoji(guildId, emojiId, body, { reason, signal } = {}) {
952
1051
  return this.rest.patch(import_v103.Routes.guildEmoji(guildId, emojiId), {
953
1052
  reason,
954
- body: data
1053
+ body,
1054
+ signal
955
1055
  });
956
1056
  }
957
1057
  /**
@@ -960,21 +1060,23 @@ var GuildsAPI = class {
960
1060
  * @see {@link https://discord.com/developers/docs/resources/emoji#delete-guild-emoji}
961
1061
  * @param guildId - The id of the guild to delete the emoji from
962
1062
  * @param emojiId - The id of the emoji to delete
963
- * @param reason - The reason for deleting the emoji
1063
+ * @param options - The options for deleting the emoji
964
1064
  */
965
- async deleteEmoji(guildId, emojiId, reason) {
966
- await this.rest.delete(import_v103.Routes.guildEmoji(guildId, emojiId), { reason });
1065
+ async deleteEmoji(guildId, emojiId, { reason, signal } = {}) {
1066
+ await this.rest.delete(import_v103.Routes.guildEmoji(guildId, emojiId), { reason, signal });
967
1067
  }
968
1068
  /**
969
1069
  * Fetches all scheduled events for a guild
970
1070
  *
971
1071
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}
972
1072
  * @param guildId - The id of the guild to fetch the scheduled events from
1073
+ * @param query - The query options for fetching the scheduled events
973
1074
  * @param options - The options for fetching the scheduled events
974
1075
  */
975
- async getScheduledEvents(guildId, options = {}) {
1076
+ async getScheduledEvents(guildId, query = {}, { signal } = {}) {
976
1077
  return this.rest.get(import_v103.Routes.guildScheduledEvents(guildId), {
977
- query: (0, import_rest3.makeURLSearchParams)(options)
1078
+ query: (0, import_rest3.makeURLSearchParams)(query),
1079
+ signal
978
1080
  });
979
1081
  }
980
1082
  /**
@@ -982,13 +1084,14 @@ var GuildsAPI = class {
982
1084
  *
983
1085
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}
984
1086
  * @param guildId - The id of the guild to create the scheduled event from
985
- * @param data - The data to create the event with
986
- * @param reason - The reason for creating the scheduled event
1087
+ * @param body - The data to create the event with
1088
+ * @param options - The options for creating the scheduled event
987
1089
  */
988
- async createScheduledEvent(guildId, data, reason) {
1090
+ async createScheduledEvent(guildId, body, { reason, signal } = {}) {
989
1091
  return this.rest.post(import_v103.Routes.guildScheduledEvents(guildId), {
990
1092
  reason,
991
- body: data
1093
+ body,
1094
+ signal
992
1095
  });
993
1096
  }
994
1097
  /**
@@ -997,11 +1100,13 @@ var GuildsAPI = class {
997
1100
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event}
998
1101
  * @param guildId - The id of the guild to fetch the scheduled event from
999
1102
  * @param eventId - The id of the scheduled event to fetch
1103
+ * @param query - The options for fetching the scheduled event
1000
1104
  * @param options - The options for fetching the scheduled event
1001
1105
  */
1002
- async getScheduledEvent(guildId, eventId, options = {}) {
1106
+ async getScheduledEvent(guildId, eventId, query = {}, { signal } = {}) {
1003
1107
  return this.rest.get(import_v103.Routes.guildScheduledEvent(guildId, eventId), {
1004
- query: (0, import_rest3.makeURLSearchParams)(options)
1108
+ query: (0, import_rest3.makeURLSearchParams)(query),
1109
+ signal
1005
1110
  });
1006
1111
  }
1007
1112
  /**
@@ -1010,13 +1115,14 @@ var GuildsAPI = class {
1010
1115
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
1011
1116
  * @param guildId - The id of the guild to edit the scheduled event from
1012
1117
  * @param eventId - The id of the scheduled event to edit
1013
- * @param data - The new event data
1014
- * @param reason - The reason for editing the scheduled event
1118
+ * @param body - The new event data
1119
+ * @param options - The options for editing the scheduled event
1015
1120
  */
1016
- async editScheduledEvent(guildId, eventId, data, reason) {
1121
+ async editScheduledEvent(guildId, eventId, body, { reason, signal } = {}) {
1017
1122
  return this.rest.patch(import_v103.Routes.guildScheduledEvent(guildId, eventId), {
1018
1123
  reason,
1019
- body: data
1124
+ body,
1125
+ signal
1020
1126
  });
1021
1127
  }
1022
1128
  /**
@@ -1025,10 +1131,10 @@ var GuildsAPI = class {
1025
1131
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event}
1026
1132
  * @param guildId - The id of the guild to delete the scheduled event from
1027
1133
  * @param eventId - The id of the scheduled event to delete
1028
- * @param reason - The reason for deleting the scheduled event
1134
+ * @param options - The options for deleting the scheduled event
1029
1135
  */
1030
- async deleteScheduledEvent(guildId, eventId, reason) {
1031
- await this.rest.delete(import_v103.Routes.guildScheduledEvent(guildId, eventId), { reason });
1136
+ async deleteScheduledEvent(guildId, eventId, { reason, signal } = {}) {
1137
+ await this.rest.delete(import_v103.Routes.guildScheduledEvent(guildId, eventId), { reason, signal });
1032
1138
  }
1033
1139
  /**
1034
1140
  * Gets all users that are interested in a scheduled event
@@ -1036,11 +1142,13 @@ var GuildsAPI = class {
1036
1142
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}
1037
1143
  * @param guildId - The id of the guild to fetch the scheduled event users from
1038
1144
  * @param eventId - The id of the scheduled event to fetch the users for
1145
+ * @param query - The options for fetching the scheduled event users
1039
1146
  * @param options - The options for fetching the scheduled event users
1040
1147
  */
1041
- async getScheduledEventUsers(guildId, eventId, options = {}) {
1148
+ async getScheduledEventUsers(guildId, eventId, query = {}, { signal } = {}) {
1042
1149
  return this.rest.get(import_v103.Routes.guildScheduledEventUsers(guildId, eventId), {
1043
- query: (0, import_rest3.makeURLSearchParams)(options)
1150
+ query: (0, import_rest3.makeURLSearchParams)(query),
1151
+ signal
1044
1152
  });
1045
1153
  }
1046
1154
  /**
@@ -1048,9 +1156,10 @@ var GuildsAPI = class {
1048
1156
  *
1049
1157
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
1050
1158
  * @param guildId - The id of the guild to fetch the templates from
1159
+ * @param options - The options for fetching the templates
1051
1160
  */
1052
- async getTemplates(guildId) {
1053
- return this.rest.get(import_v103.Routes.guildTemplates(guildId));
1161
+ async getTemplates(guildId, { signal } = {}) {
1162
+ return this.rest.get(import_v103.Routes.guildTemplates(guildId), { signal });
1054
1163
  }
1055
1164
  /**
1056
1165
  * Syncs a template for a guild
@@ -1058,9 +1167,12 @@ var GuildsAPI = class {
1058
1167
  * @see {@link https://discord.com/developers/docs/resources/guild-template#sync-guild-template}
1059
1168
  * @param guildId - The id of the guild to sync the template from
1060
1169
  * @param templateCode - The code of the template to sync
1170
+ * @param options - The options for syncing the template
1061
1171
  */
1062
- async syncTemplate(guildId, templateCode) {
1063
- return this.rest.put(import_v103.Routes.guildTemplate(guildId, templateCode));
1172
+ async syncTemplate(guildId, templateCode, { signal } = {}) {
1173
+ return this.rest.put(import_v103.Routes.guildTemplate(guildId, templateCode), {
1174
+ signal
1175
+ });
1064
1176
  }
1065
1177
  /**
1066
1178
  * Edits a template for a guild
@@ -1068,11 +1180,13 @@ var GuildsAPI = class {
1068
1180
  * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template}
1069
1181
  * @param guildId - The id of the guild to edit the template from
1070
1182
  * @param templateCode - The code of the template to edit
1071
- * @param data - The data for editing the template
1183
+ * @param body - The data for editing the template
1184
+ * @param options - The options for editing the template
1072
1185
  */
1073
- async editTemplate(guildId, templateCode, data) {
1186
+ async editTemplate(guildId, templateCode, body, { signal } = {}) {
1074
1187
  return this.rest.patch(import_v103.Routes.guildTemplate(guildId, templateCode), {
1075
- body: data
1188
+ body,
1189
+ signal
1076
1190
  });
1077
1191
  }
1078
1192
  /**
@@ -1081,18 +1195,20 @@ var GuildsAPI = class {
1081
1195
  * @see {@link https://discord.com/developers/docs/resources/guild-template#delete-guild-template}
1082
1196
  * @param guildId - The id of the guild to delete the template from
1083
1197
  * @param templateCode - The code of the template to delete
1198
+ * @param options - The options for deleting the template
1084
1199
  */
1085
- async deleteTemplate(guildId, templateCode) {
1086
- await this.rest.delete(import_v103.Routes.guildTemplate(guildId, templateCode));
1200
+ async deleteTemplate(guildId, templateCode, { signal } = {}) {
1201
+ await this.rest.delete(import_v103.Routes.guildTemplate(guildId, templateCode), { signal });
1087
1202
  }
1088
1203
  /**
1089
1204
  * Fetches all the stickers for a guild
1090
1205
  *
1091
1206
  * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers}
1092
1207
  * @param guildId - The id of the guild to fetch the stickers from
1208
+ * @param options - The options for fetching the stickers
1093
1209
  */
1094
- async getStickers(guildId) {
1095
- return this.rest.get(import_v103.Routes.guildStickers(guildId));
1210
+ async getStickers(guildId, { signal } = {}) {
1211
+ return this.rest.get(import_v103.Routes.guildStickers(guildId), { signal });
1096
1212
  }
1097
1213
  /**
1098
1214
  * Fetches a sticker for a guild
@@ -1100,25 +1216,27 @@ var GuildsAPI = class {
1100
1216
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker}
1101
1217
  * @param guildId - The id of the guild to fetch the sticker from
1102
1218
  * @param stickerId - The id of the sticker to fetch
1219
+ * @param options - The options for fetching the sticker
1103
1220
  */
1104
- async getSticker(guildId, stickerId) {
1105
- return this.rest.get(import_v103.Routes.guildSticker(guildId, stickerId));
1221
+ async getSticker(guildId, stickerId, { signal } = {}) {
1222
+ return this.rest.get(import_v103.Routes.guildSticker(guildId, stickerId), { signal });
1106
1223
  }
1107
1224
  /**
1108
1225
  * Creates a sticker for a guild
1109
1226
  *
1110
1227
  * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker}
1111
1228
  * @param guildId - The id of the guild to create the sticker for
1112
- * @param data - The data for creating the sticker
1113
- * @param reason - The reason for creating the sticker
1229
+ * @param body - The data for creating the sticker
1230
+ * @param options - The options for creating the sticker
1114
1231
  */
1115
- async createSticker(guildId, { file, ...body }, reason) {
1232
+ async createSticker(guildId, { file, ...body }, { reason, signal } = {}) {
1116
1233
  const fileData = { ...file, key: "file" };
1117
1234
  return this.rest.post(import_v103.Routes.guildStickers(guildId), {
1118
1235
  appendToFormData: true,
1119
1236
  body,
1120
1237
  files: [fileData],
1121
- reason
1238
+ reason,
1239
+ signal
1122
1240
  });
1123
1241
  }
1124
1242
  /**
@@ -1127,13 +1245,14 @@ var GuildsAPI = class {
1127
1245
  * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker}
1128
1246
  * @param guildId - The id of the guild to edit the sticker from
1129
1247
  * @param stickerId - The id of the sticker to edit
1130
- * @param data - The data for editing the sticker
1131
- * @param reason - The reason for editing the sticker
1248
+ * @param body - The data for editing the sticker
1249
+ * @param options - The options for editing the sticker
1132
1250
  */
1133
- async editSticker(guildId, stickerId, data, reason) {
1251
+ async editSticker(guildId, stickerId, body, { reason, signal } = {}) {
1134
1252
  return this.rest.patch(import_v103.Routes.guildSticker(guildId, stickerId), {
1135
1253
  reason,
1136
- body: data
1254
+ body,
1255
+ signal
1137
1256
  });
1138
1257
  }
1139
1258
  /**
@@ -1142,21 +1261,23 @@ var GuildsAPI = class {
1142
1261
  * @see {@link https://discord.com/developers/docs/resources/sticker#delete-guild-sticker}
1143
1262
  * @param guildId - The id of the guild to delete the sticker from
1144
1263
  * @param stickerId - The id of the sticker to delete
1145
- * @param reason - The reason for deleting the sticker
1264
+ * @param options - The options for deleting the sticker
1146
1265
  */
1147
- async deleteSticker(guildId, stickerId, reason) {
1148
- await this.rest.delete(import_v103.Routes.guildSticker(guildId, stickerId), { reason });
1266
+ async deleteSticker(guildId, stickerId, { reason, signal } = {}) {
1267
+ await this.rest.delete(import_v103.Routes.guildSticker(guildId, stickerId), { reason, signal });
1149
1268
  }
1150
1269
  /**
1151
1270
  * Fetches the audit logs for a guild
1152
1271
  *
1153
1272
  * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
1154
1273
  * @param guildId - The id of the guild to fetch the audit logs from
1274
+ * @param query - The query options for fetching the audit logs
1155
1275
  * @param options - The options for fetching the audit logs
1156
1276
  */
1157
- async getAuditLogs(guildId, options = {}) {
1277
+ async getAuditLogs(guildId, query = {}, { signal } = {}) {
1158
1278
  return this.rest.get(import_v103.Routes.guildAuditLog(guildId), {
1159
- query: (0, import_rest3.makeURLSearchParams)(options)
1279
+ query: (0, import_rest3.makeURLSearchParams)(query),
1280
+ signal
1160
1281
  });
1161
1282
  }
1162
1283
  /**
@@ -1164,9 +1285,12 @@ var GuildsAPI = class {
1164
1285
  *
1165
1286
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild}
1166
1287
  * @param guildId - The id of the guild to fetch the auto moderation rules from
1288
+ * @param options - The options for fetching the auto moderation rules
1167
1289
  */
1168
- async getAutoModerationRules(guildId) {
1169
- return this.rest.get(import_v103.Routes.guildAutoModerationRules(guildId));
1290
+ async getAutoModerationRules(guildId, { signal } = {}) {
1291
+ return this.rest.get(import_v103.Routes.guildAutoModerationRules(guildId), {
1292
+ signal
1293
+ });
1170
1294
  }
1171
1295
  /**
1172
1296
  * Fetches an auto moderation rule for a guild
@@ -1174,23 +1298,26 @@ var GuildsAPI = class {
1174
1298
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule}
1175
1299
  * @param guildId - The id of the guild to fetch the auto moderation rule from
1176
1300
  * @param ruleId - The id of the auto moderation rule to fetch
1301
+ * @param options - The options for fetching the auto moderation rule
1177
1302
  */
1178
- async getAutoModerationRule(guildId, ruleId) {
1179
- return this.rest.get(
1180
- import_v103.Routes.guildAutoModerationRule(guildId, ruleId)
1181
- );
1303
+ async getAutoModerationRule(guildId, ruleId, { signal } = {}) {
1304
+ return this.rest.get(import_v103.Routes.guildAutoModerationRule(guildId, ruleId), {
1305
+ signal
1306
+ });
1182
1307
  }
1183
1308
  /**
1184
1309
  * Creates a new auto moderation rule for a guild
1185
1310
  *
1186
1311
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}
1187
1312
  * @param guildId - The id of the guild to create the auto moderation rule from
1188
- * @param data - The data for creating the auto moderation rule
1313
+ * @param body - The data for creating the auto moderation rule
1314
+ * @param options - The options for creating the auto moderation rule
1189
1315
  */
1190
- async createAutoModerationRule(guildId, data, reason) {
1316
+ async createAutoModerationRule(guildId, body, { reason, signal } = {}) {
1191
1317
  return this.rest.post(import_v103.Routes.guildAutoModerationRules(guildId), {
1192
1318
  reason,
1193
- body: data
1319
+ body,
1320
+ signal
1194
1321
  });
1195
1322
  }
1196
1323
  /**
@@ -1199,13 +1326,14 @@ var GuildsAPI = class {
1199
1326
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}
1200
1327
  * @param guildId - The id of the guild to edit the auto moderation rule from
1201
1328
  * @param ruleId - The id of the auto moderation rule to edit
1202
- * @param data - The data for editing the auto moderation rule
1203
- * @param reason - The reason for editing the auto moderation rule
1329
+ * @param body - The data for editing the auto moderation rule
1330
+ * @param options - The options for editing the auto moderation rule
1204
1331
  */
1205
- async editAutoModerationRule(guildId, ruleId, data, reason) {
1332
+ async editAutoModerationRule(guildId, ruleId, body, { reason, signal } = {}) {
1206
1333
  return this.rest.patch(import_v103.Routes.guildAutoModerationRule(guildId, ruleId), {
1207
1334
  reason,
1208
- body: data
1335
+ body,
1336
+ signal
1209
1337
  });
1210
1338
  }
1211
1339
  /**
@@ -1213,11 +1341,10 @@ var GuildsAPI = class {
1213
1341
  *
1214
1342
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule}
1215
1343
  * @param guildId - The id of the guild to delete the auto moderation rule from
1216
- * @param ruleId - The id of the auto moderation rule to delete
1217
- * @param reason - The reason for deleting the auto moderation rule
1344
+ * @param options - The options for deleting the auto moderation rule
1218
1345
  */
1219
- async deleteAutoModerationRule(guildId, ruleId, reason) {
1220
- await this.rest.delete(import_v103.Routes.guildAutoModerationRule(guildId, ruleId), { reason });
1346
+ async deleteAutoModerationRule(guildId, ruleId, { reason, signal } = {}) {
1347
+ await this.rest.delete(import_v103.Routes.guildAutoModerationRule(guildId, ruleId), { reason, signal });
1221
1348
  }
1222
1349
  /**
1223
1350
  * Fetches a guild member
@@ -1225,9 +1352,10 @@ var GuildsAPI = class {
1225
1352
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
1226
1353
  * @param guildId - The id of the guild
1227
1354
  * @param userId - The id of the user
1355
+ * @param options - The options for fetching the guild member
1228
1356
  */
1229
- async getMember(guildId, userId) {
1230
- return this.rest.get(import_v103.Routes.guildMember(guildId, userId));
1357
+ async getMember(guildId, userId, { signal } = {}) {
1358
+ return this.rest.get(import_v103.Routes.guildMember(guildId, userId), { signal });
1231
1359
  }
1232
1360
  /**
1233
1361
  * Searches for guild members
@@ -1235,11 +1363,12 @@ var GuildsAPI = class {
1235
1363
  * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members}
1236
1364
  * @param guildId - The id of the guild to search in
1237
1365
  * @param query - The query to search for
1238
- * @param limit - The maximum number of members to return
1366
+ * @param options - The options for searching for guild members
1239
1367
  */
1240
- async searchForMembers(guildId, options) {
1368
+ async searchForMembers(guildId, query, { signal } = {}) {
1241
1369
  return this.rest.get(import_v103.Routes.guildMembersSearch(guildId), {
1242
- query: (0, import_rest3.makeURLSearchParams)(options)
1370
+ query: (0, import_rest3.makeURLSearchParams)(query),
1371
+ signal
1243
1372
  });
1244
1373
  }
1245
1374
  /**
@@ -1248,13 +1377,14 @@ var GuildsAPI = class {
1248
1377
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}
1249
1378
  * @param guildId - The id of the guild
1250
1379
  * @param userId - The id of the user
1251
- * @param data - The data to use when editing the guild member
1252
- * @param reason - The reason for editing this guild member
1380
+ * @param body - The data to use when editing the guild member
1381
+ * @param options - The options for editing the guild member
1253
1382
  */
1254
- async editMember(guildId, userId, data = {}, reason) {
1383
+ async editMember(guildId, userId, body = {}, { reason, signal } = {}) {
1255
1384
  return this.rest.patch(import_v103.Routes.guildMember(guildId, userId), {
1256
1385
  reason,
1257
- body: data
1386
+ body,
1387
+ signal
1258
1388
  });
1259
1389
  }
1260
1390
  /**
@@ -1264,10 +1394,10 @@ var GuildsAPI = class {
1264
1394
  * @param guildId - The id of the guild
1265
1395
  * @param userId - The id of the user
1266
1396
  * @param roleId - The id of the role
1267
- * @param reason - The reason for adding this role to the guild member
1397
+ * @param options - The options for adding a role to a guild member
1268
1398
  */
1269
- async addRoleToMember(guildId, userId, roleId, reason) {
1270
- await this.rest.put(import_v103.Routes.guildMemberRole(guildId, userId, roleId), { reason });
1399
+ async addRoleToMember(guildId, userId, roleId, { reason, signal } = {}) {
1400
+ await this.rest.put(import_v103.Routes.guildMemberRole(guildId, userId, roleId), { reason, signal });
1271
1401
  }
1272
1402
  /**
1273
1403
  * Removes a role from a guild member
@@ -1276,29 +1406,31 @@ var GuildsAPI = class {
1276
1406
  * @param guildId - The id of the guild
1277
1407
  * @param userId - The id of the user
1278
1408
  * @param roleId - The id of the role
1279
- * @param reason - The reason for removing this role from the guild member
1409
+ * @param options - The options for removing a role from a guild member
1280
1410
  */
1281
- async removeRoleFromMember(guildId, userId, roleId, reason) {
1282
- await this.rest.delete(import_v103.Routes.guildMemberRole(guildId, userId, roleId), { reason });
1411
+ async removeRoleFromMember(guildId, userId, roleId, { reason, signal }) {
1412
+ await this.rest.delete(import_v103.Routes.guildMemberRole(guildId, userId, roleId), { reason, signal });
1283
1413
  }
1284
1414
  /**
1285
1415
  * Fetches a guild template
1286
1416
  *
1287
1417
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template}
1288
1418
  * @param templateCode - The code of the template
1419
+ * @param options - The options for fetching the guild template
1289
1420
  */
1290
- async getTemplate(templateCode) {
1291
- return this.rest.get(import_v103.Routes.template(templateCode));
1421
+ async getTemplate(templateCode, { signal } = {}) {
1422
+ return this.rest.get(import_v103.Routes.template(templateCode), { signal });
1292
1423
  }
1293
1424
  /**
1294
1425
  * Creates a new template
1295
1426
  *
1296
1427
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
1297
1428
  * @param templateCode - The code of the template
1298
- * @param data - The data to use when creating the template
1429
+ * @param body - The data to use when creating the template
1430
+ * @param options - The options for creating the template
1299
1431
  */
1300
- async createTemplate(templateCode, data) {
1301
- return this.rest.post(import_v103.Routes.template(templateCode), { body: data });
1432
+ async createTemplate(templateCode, body, { signal } = {}) {
1433
+ return this.rest.post(import_v103.Routes.template(templateCode), { body, signal });
1302
1434
  }
1303
1435
  /**
1304
1436
  * Fetches webhooks for a guild
@@ -1314,11 +1446,11 @@ var GuildsAPI = class {
1314
1446
  *
1315
1447
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}
1316
1448
  * @param guildId - The id of the guild
1317
- * @param options - The options to use when setting the voice state
1449
+ * @param body - The options to use when setting the voice state
1318
1450
  */
1319
- async setVoiceState(guildId, options = {}) {
1451
+ async setVoiceState(guildId, body = {}) {
1320
1452
  return this.rest.patch(import_v103.Routes.guildVoiceState(guildId, "@me"), {
1321
- body: options
1453
+ body
1322
1454
  });
1323
1455
  }
1324
1456
  };
@@ -1337,16 +1469,18 @@ var InteractionsAPI = class {
1337
1469
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1338
1470
  * @param interactionId - The id of the interaction
1339
1471
  * @param interactionToken - The token of the interaction
1340
- * @param data - The data to use when replying
1472
+ * @param body - The callback data to use when replying
1473
+ * @param options - The options to use when replying
1341
1474
  */
1342
- async reply(interactionId, interactionToken, { files, ...data }) {
1475
+ async reply(interactionId, interactionToken, { files, ...data }, { signal } = {}) {
1343
1476
  await this.rest.post(import_v104.Routes.interactionCallback(interactionId, interactionToken), {
1344
1477
  files,
1345
1478
  auth: false,
1346
1479
  body: {
1347
1480
  type: import_v104.InteractionResponseType.ChannelMessageWithSource,
1348
1481
  data
1349
- }
1482
+ },
1483
+ signal
1350
1484
  });
1351
1485
  }
1352
1486
  /**
@@ -1355,13 +1489,17 @@ var InteractionsAPI = class {
1355
1489
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1356
1490
  * @param interactionId - The id of the interaction
1357
1491
  * @param interactionToken - The token of the interaction
1492
+ * @param data - The data to use when deferring the reply
1493
+ * @param options - The options to use when deferring
1358
1494
  */
1359
- async defer(interactionId, interactionToken) {
1495
+ async defer(interactionId, interactionToken, data, { signal } = {}) {
1360
1496
  await this.rest.post(import_v104.Routes.interactionCallback(interactionId, interactionToken), {
1361
1497
  auth: false,
1362
1498
  body: {
1363
- type: import_v104.InteractionResponseType.DeferredChannelMessageWithSource
1364
- }
1499
+ type: import_v104.InteractionResponseType.DeferredChannelMessageWithSource,
1500
+ data
1501
+ },
1502
+ signal
1365
1503
  });
1366
1504
  }
1367
1505
  /**
@@ -1370,13 +1508,15 @@ var InteractionsAPI = class {
1370
1508
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1371
1509
  * @param interactionId - The id of the interaction
1372
1510
  * @param interactionToken - The token of the interaction
1511
+ * @param options - The options to use when deferring
1373
1512
  */
1374
- async deferMessageUpdate(interactionId, interactionToken) {
1513
+ async deferMessageUpdate(interactionId, interactionToken, { signal } = {}) {
1375
1514
  await this.rest.post(import_v104.Routes.interactionCallback(interactionId, interactionToken), {
1376
1515
  auth: false,
1377
1516
  body: {
1378
1517
  type: import_v104.InteractionResponseType.DeferredMessageUpdate
1379
- }
1518
+ },
1519
+ signal
1380
1520
  });
1381
1521
  }
1382
1522
  /**
@@ -1385,10 +1525,11 @@ var InteractionsAPI = class {
1385
1525
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
1386
1526
  * @param applicationId - The application id of the interaction
1387
1527
  * @param interactionToken - The token of the interaction
1388
- * @param data - The data to use when replying
1528
+ * @param body - The callback data to use when replying
1529
+ * @param options - The options to use when replying
1389
1530
  */
1390
- async followUp(applicationId, interactionToken, data) {
1391
- await this.webhooks.execute(applicationId, interactionToken, data);
1531
+ async followUp(applicationId, interactionToken, body, { signal } = {}) {
1532
+ await this.webhooks.execute(applicationId, interactionToken, body, { signal });
1392
1533
  }
1393
1534
  /**
1394
1535
  * Edits the initial reply to an interaction
@@ -1397,11 +1538,14 @@ var InteractionsAPI = class {
1397
1538
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
1398
1539
  * @param applicationId - The application id of the interaction
1399
1540
  * @param interactionToken - The token of the interaction
1400
- * @param data - The data to use when editing the reply
1541
+ * @param callbackData - The callback data to use when editing the reply
1401
1542
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1543
+ * @param options - The options to use when editing the reply
1402
1544
  */
1403
- async editReply(applicationId, interactionToken, data, messageId) {
1404
- return this.webhooks.editMessage(applicationId, interactionToken, messageId ?? "@original", data);
1545
+ async editReply(applicationId, interactionToken, callbackData, messageId, { signal } = {}) {
1546
+ return this.webhooks.editMessage(applicationId, interactionToken, messageId ?? "@original", callbackData, {
1547
+ signal
1548
+ });
1405
1549
  }
1406
1550
  /**
1407
1551
  * Fetches the initial reply to an interaction
@@ -1409,12 +1553,15 @@ var InteractionsAPI = class {
1409
1553
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}
1410
1554
  * @param applicationId - The application id of the interaction
1411
1555
  * @param interactionToken - The token of the interaction
1556
+ * @param options - The options to use when fetching the reply
1412
1557
  */
1413
- async getOriginalReply(applicationId, interactionToken) {
1558
+ async getOriginalReply(applicationId, interactionToken, { signal }) {
1414
1559
  return this.webhooks.getMessage(
1415
1560
  applicationId,
1416
1561
  interactionToken,
1417
- "@original"
1562
+ "@original",
1563
+ {},
1564
+ { signal }
1418
1565
  );
1419
1566
  }
1420
1567
  /**
@@ -1425,9 +1572,10 @@ var InteractionsAPI = class {
1425
1572
  * @param applicationId - The application id of the interaction
1426
1573
  * @param interactionToken - The token of the interaction
1427
1574
  * @param messageId - The id of the message to delete. If omitted, the original reply will be deleted
1575
+ * @param options - The options to use when deleting the reply
1428
1576
  */
1429
- async deleteReply(applicationId, interactionToken, messageId) {
1430
- await this.webhooks.deleteMessage(applicationId, interactionToken, messageId ?? "@original");
1577
+ async deleteReply(applicationId, interactionToken, messageId, { signal } = {}) {
1578
+ await this.webhooks.deleteMessage(applicationId, interactionToken, messageId ?? "@original", {}, { signal });
1431
1579
  }
1432
1580
  /**
1433
1581
  * Updates the the message the component interaction was triggered on
@@ -1435,16 +1583,18 @@ var InteractionsAPI = class {
1435
1583
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1436
1584
  * @param interactionId - The id of the interaction
1437
1585
  * @param interactionToken - The token of the interaction
1438
- * @param data - The data to use when updating the interaction
1586
+ * @param callbackData - The callback data to use when updating the interaction
1587
+ * @param options - The options to use when updating the interaction
1439
1588
  */
1440
- async updateMessage(interactionId, interactionToken, { files, ...data }) {
1589
+ async updateMessage(interactionId, interactionToken, { files, ...data }, { signal } = {}) {
1441
1590
  await this.rest.post(import_v104.Routes.interactionCallback(interactionId, interactionToken), {
1442
1591
  files,
1443
1592
  auth: false,
1444
1593
  body: {
1445
1594
  type: import_v104.InteractionResponseType.UpdateMessage,
1446
1595
  data
1447
- }
1596
+ },
1597
+ signal
1448
1598
  });
1449
1599
  }
1450
1600
  /**
@@ -1453,15 +1603,17 @@ var InteractionsAPI = class {
1453
1603
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1454
1604
  * @param interactionId - The id of the interaction
1455
1605
  * @param interactionToken - The token of the interaction
1456
- * @param data - Data for the autocomplete response
1606
+ * @param callbackData - The callback data for the autocomplete response
1607
+ * @param options - The options to use when sending the autocomplete response
1457
1608
  */
1458
- async createAutocompleteResponse(interactionId, interactionToken, data) {
1609
+ async createAutocompleteResponse(interactionId, interactionToken, callbackData, { signal } = {}) {
1459
1610
  await this.rest.post(import_v104.Routes.interactionCallback(interactionId, interactionToken), {
1460
1611
  auth: false,
1461
1612
  body: {
1462
1613
  type: import_v104.InteractionResponseType.ApplicationCommandAutocompleteResult,
1463
- data
1464
- }
1614
+ data: callbackData
1615
+ },
1616
+ signal
1465
1617
  });
1466
1618
  }
1467
1619
  /**
@@ -1470,15 +1622,17 @@ var InteractionsAPI = class {
1470
1622
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1471
1623
  * @param interactionId - The id of the interaction
1472
1624
  * @param interactionToken - The token of the interaction
1473
- * @param data - The modal to send
1625
+ * @param callbackData - The modal callback data to send
1626
+ * @param options - The options to use when sending the modal
1474
1627
  */
1475
- async createModal(interactionId, interactionToken, data) {
1628
+ async createModal(interactionId, interactionToken, callbackData, { signal } = {}) {
1476
1629
  await this.rest.post(import_v104.Routes.interactionCallback(interactionId, interactionToken), {
1477
1630
  auth: false,
1478
1631
  body: {
1479
1632
  type: import_v104.InteractionResponseType.Modal,
1480
- data
1481
- }
1633
+ data: callbackData
1634
+ },
1635
+ signal
1482
1636
  });
1483
1637
  }
1484
1638
  };
@@ -1496,10 +1650,13 @@ var InvitesAPI = class {
1496
1650
  *
1497
1651
  * @see {@link https://discord.com/developers/docs/resources/invite#get-invite}
1498
1652
  * @param code - The invite code
1653
+ * @param query - The options to use when fetching the invite
1654
+ * @param options - The options to use when fetching the invite
1499
1655
  */
1500
- async get(code, options = {}) {
1656
+ async get(code, query = {}, { signal } = {}) {
1501
1657
  return this.rest.get(import_v105.Routes.invite(code), {
1502
- query: (0, import_rest4.makeURLSearchParams)(options)
1658
+ query: (0, import_rest4.makeURLSearchParams)(query),
1659
+ signal
1503
1660
  });
1504
1661
  }
1505
1662
  /**
@@ -1507,10 +1664,10 @@ var InvitesAPI = class {
1507
1664
  *
1508
1665
  * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite}
1509
1666
  * @param code - The invite code
1510
- * @param reason - The reason for deleting the invite
1667
+ * @param options - The options to use when deleting the invite
1511
1668
  */
1512
- async delete(code, reason) {
1513
- await this.rest.delete(import_v105.Routes.invite(code), { reason });
1669
+ async delete(code, { reason, signal } = {}) {
1670
+ await this.rest.delete(import_v105.Routes.invite(code), { reason, signal });
1514
1671
  }
1515
1672
  };
1516
1673
  __name(InvitesAPI, "InvitesAPI");
@@ -1538,30 +1695,34 @@ var OAuth2API = class {
1538
1695
  * Performs an OAuth2 token exchange, giving you an access token
1539
1696
  *
1540
1697
  * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-exchange-example}
1698
+ * @param body - The body of the token exchange request
1541
1699
  * @param options - The options for the token exchange request
1542
1700
  */
1543
- async tokenExchange(options) {
1701
+ async tokenExchange(body, { signal } = {}) {
1544
1702
  return this.rest.post(import_v106.Routes.oauth2TokenExchange(), {
1545
- body: (0, import_rest5.makeURLSearchParams)(options),
1703
+ body: (0, import_rest5.makeURLSearchParams)(body),
1546
1704
  passThroughBody: true,
1547
1705
  headers: {
1548
1706
  "Content-Type": "application/x-www-form-urlencoded"
1549
- }
1707
+ },
1708
+ signal
1550
1709
  });
1551
1710
  }
1552
1711
  /**
1553
1712
  * Refreshes an OAuth2 access token, giving you a new one
1554
1713
  *
1555
1714
  * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example}
1715
+ * @param body - The options for the refresh token request
1556
1716
  * @param options - The options for the refresh token request
1557
1717
  */
1558
- async refreshToken(options) {
1718
+ async refreshToken(body, { signal } = {}) {
1559
1719
  return this.rest.post(import_v106.Routes.oauth2TokenExchange(), {
1560
- body: (0, import_rest5.makeURLSearchParams)(options),
1720
+ body: (0, import_rest5.makeURLSearchParams)(body),
1561
1721
  passThroughBody: true,
1562
1722
  headers: {
1563
1723
  "Content-Type": "application/x-www-form-urlencoded"
1564
- }
1724
+ },
1725
+ signal
1565
1726
  });
1566
1727
  }
1567
1728
  /**
@@ -1570,32 +1731,40 @@ var OAuth2API = class {
1570
1731
  * @remarks
1571
1732
  * This is primarily used for testing purposes
1572
1733
  * @see {@link https://discord.com/developers/docs/topics/oauth2#client-credentials-grant}
1734
+ * @param body - The options for the client credentials grant request
1573
1735
  * @param options - The options for the client credentials grant request
1574
1736
  */
1575
- async getToken(options) {
1737
+ async getToken(body, { signal } = {}) {
1576
1738
  return this.rest.post(import_v106.Routes.oauth2TokenExchange(), {
1577
- body: (0, import_rest5.makeURLSearchParams)(options),
1739
+ body: (0, import_rest5.makeURLSearchParams)(body),
1578
1740
  passThroughBody: true,
1579
1741
  headers: {
1580
1742
  "Content-Type": "application/x-www-form-urlencoded"
1581
- }
1743
+ },
1744
+ signal
1582
1745
  });
1583
1746
  }
1584
1747
  /**
1585
1748
  * Fetches the current bot's application information
1586
1749
  *
1587
1750
  * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
1751
+ * @param options - The options for the current bot application information request
1588
1752
  */
1589
- async getCurrentBotApplicationInformation() {
1590
- return this.rest.get(import_v106.Routes.oauth2CurrentApplication());
1753
+ async getCurrentBotApplicationInformation({ signal } = {}) {
1754
+ return this.rest.get(import_v106.Routes.oauth2CurrentApplication(), {
1755
+ signal
1756
+ });
1591
1757
  }
1592
1758
  /**
1593
1759
  * Fetches the current authorization information
1594
1760
  *
1595
1761
  * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}
1762
+ * @param options - The options for the current authorization information request
1596
1763
  */
1597
- async getCurrentAuthorizationInformation() {
1598
- return this.rest.get(import_v106.Routes.oauth2CurrentAuthorization());
1764
+ async getCurrentAuthorizationInformation({ signal } = {}) {
1765
+ return this.rest.get(import_v106.Routes.oauth2CurrentAuthorization(), {
1766
+ signal
1767
+ });
1599
1768
  }
1600
1769
  };
1601
1770
  __name(OAuth2API, "OAuth2API");
@@ -1611,22 +1780,25 @@ var RoleConnectionsAPI = class {
1611
1780
  *
1612
1781
  * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records}
1613
1782
  * @param applicationId - The id of the application to get role connection metadata records for
1783
+ * @param options - The options to use when fetching the role connection metadata records
1614
1784
  */
1615
- async getMetadataRecords(applicationId) {
1616
- return this.rest.get(
1617
- import_v107.Routes.applicationRoleConnectionMetadata(applicationId)
1618
- );
1785
+ async getMetadataRecords(applicationId, { signal } = {}) {
1786
+ return this.rest.get(import_v107.Routes.applicationRoleConnectionMetadata(applicationId), {
1787
+ signal
1788
+ });
1619
1789
  }
1620
1790
  /**
1621
1791
  * Updates the role connection metadata records for the application
1622
1792
  *
1623
1793
  * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records}
1624
1794
  * @param applicationId - The id of the application to update role connection metadata records for
1625
- * @param options - The new role connection metadata records
1795
+ * @param body - The new role connection metadata records
1796
+ * @param options - The options to use when updating the role connection metadata records
1626
1797
  */
1627
- async updateMetadataRecords(applicationId, options) {
1798
+ async updateMetadataRecords(applicationId, body, { signal } = {}) {
1628
1799
  return this.rest.put(import_v107.Routes.applicationRoleConnectionMetadata(applicationId), {
1629
- body: options
1800
+ body,
1801
+ signal
1630
1802
  });
1631
1803
  }
1632
1804
  };
@@ -1642,18 +1814,20 @@ var StickersAPI = class {
1642
1814
  * Fetches all of the nitro sticker packs
1643
1815
  *
1644
1816
  * @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}
1817
+ * @param options - The options to use when fetching the sticker packs
1645
1818
  */
1646
- async getNitroStickers() {
1647
- return this.rest.get(import_v108.Routes.nitroStickerPacks());
1819
+ async getNitroStickers({ signal } = {}) {
1820
+ return this.rest.get(import_v108.Routes.nitroStickerPacks(), { signal });
1648
1821
  }
1649
1822
  /**
1650
1823
  * Fetches a sticker
1651
1824
  *
1652
1825
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker}
1653
1826
  * @param stickerId - The id of the sticker
1827
+ * @param options - The options to use when fetching the sticker
1654
1828
  */
1655
- async get(stickerId) {
1656
- return this.rest.get(import_v108.Routes.sticker(stickerId));
1829
+ async get(stickerId, { signal } = {}) {
1830
+ return this.rest.get(import_v108.Routes.sticker(stickerId), { signal });
1657
1831
  }
1658
1832
  };
1659
1833
  __name(StickersAPI, "StickersAPI");
@@ -1669,9 +1843,10 @@ var ThreadsAPI = class {
1669
1843
  *
1670
1844
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
1671
1845
  * @param threadId - The id of the thread
1846
+ * @param options - The options to use when fetching the thread
1672
1847
  */
1673
- async get(threadId) {
1674
- return this.rest.get(import_v109.Routes.channel(threadId));
1848
+ async get(threadId, { signal } = {}) {
1849
+ return this.rest.get(import_v109.Routes.channel(threadId), { signal });
1675
1850
  }
1676
1851
  /**
1677
1852
  * Creates a new thread
@@ -1679,34 +1854,41 @@ var ThreadsAPI = class {
1679
1854
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
1680
1855
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
1681
1856
  * @param channelId - The id of the channel to start the thread in
1682
- * @param data - The data to use when starting the thread
1857
+ * @param body - The data to use when starting the thread
1858
+ * @param messageId - The id of the message to start the thread from
1859
+ * @param options - The options to use when starting the thread
1683
1860
  */
1684
- async create(channelId, { message_id, ...body }) {
1685
- return this.rest.post(import_v109.Routes.threads(channelId, message_id), { body });
1861
+ async create(channelId, body, messageId, { signal } = {}) {
1862
+ return this.rest.post(import_v109.Routes.threads(channelId, messageId), {
1863
+ body,
1864
+ signal
1865
+ });
1686
1866
  }
1687
1867
  /**
1688
1868
  * Creates a new forum post
1689
1869
  *
1690
1870
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel}
1691
1871
  * @param channelId - The id of the forum channel to start the thread in
1692
- * @param data - The data to use when starting the thread
1872
+ * @param body - The data to use when starting the thread
1873
+ * @param options - The options to use when starting the thread
1693
1874
  */
1694
- async createForumThread(channelId, { message, ...optionsBody }) {
1875
+ async createForumThread(channelId, { message, ...optionsBody }, { signal } = {}) {
1695
1876
  const { files, ...messageBody } = message;
1696
1877
  const body = {
1697
1878
  ...optionsBody,
1698
1879
  message: messageBody
1699
1880
  };
1700
- return this.rest.post(import_v109.Routes.threads(channelId), { files, body });
1881
+ return this.rest.post(import_v109.Routes.threads(channelId), { files, body, signal });
1701
1882
  }
1702
1883
  /**
1703
1884
  * Adds the current user to a thread
1704
1885
  *
1705
1886
  * @see {@link https://discord.com/developers/docs/resources/channel#join-thread}
1706
1887
  * @param threadId - The id of the thread to join
1888
+ * @param options - The options to use when joining the thread
1707
1889
  */
1708
- async join(threadId) {
1709
- await this.rest.put(import_v109.Routes.threadMembers(threadId, "@me"));
1890
+ async join(threadId, { signal } = {}) {
1891
+ await this.rest.put(import_v109.Routes.threadMembers(threadId, "@me"), { signal });
1710
1892
  }
1711
1893
  /**
1712
1894
  * Adds a member to a thread
@@ -1714,18 +1896,20 @@ var ThreadsAPI = class {
1714
1896
  * @see {@link https://discord.com/developers/docs/resources/channel#add-thread-member}
1715
1897
  * @param threadId - The id of the thread to add the member to
1716
1898
  * @param userId - The id of the user to add to the thread
1899
+ * @param options - The options to use when adding the member to the thread
1717
1900
  */
1718
- async addMember(threadId, userId) {
1719
- await this.rest.put(import_v109.Routes.threadMembers(threadId, userId));
1901
+ async addMember(threadId, userId, { signal } = {}) {
1902
+ await this.rest.put(import_v109.Routes.threadMembers(threadId, userId), { signal });
1720
1903
  }
1721
1904
  /**
1722
1905
  * Removes the current user from a thread
1723
1906
  *
1724
1907
  * @see {@link https://discord.com/developers/docs/resources/channel#leave-thread}
1725
1908
  * @param threadId - The id of the thread to leave
1909
+ * @param options - The options to use when leaving the thread
1726
1910
  */
1727
- async leave(threadId) {
1728
- await this.rest.delete(import_v109.Routes.threadMembers(threadId, "@me"));
1911
+ async leave(threadId, { signal } = {}) {
1912
+ await this.rest.delete(import_v109.Routes.threadMembers(threadId, "@me"), { signal });
1729
1913
  }
1730
1914
  /**
1731
1915
  * Removes a member from a thread
@@ -1733,9 +1917,10 @@ var ThreadsAPI = class {
1733
1917
  * @see {@link https://discord.com/developers/docs/resources/channel#remove-thread-member}
1734
1918
  * @param threadId - The id of the thread to remove the member from
1735
1919
  * @param userId - The id of the user to remove from the thread
1920
+ * @param options - The options to use when removing the member from the thread
1736
1921
  */
1737
- async removeMember(threadId, userId) {
1738
- await this.rest.delete(import_v109.Routes.threadMembers(threadId, userId));
1922
+ async removeMember(threadId, userId, { signal } = {}) {
1923
+ await this.rest.delete(import_v109.Routes.threadMembers(threadId, userId), { signal });
1739
1924
  }
1740
1925
  /**
1741
1926
  * Fetches a member of a thread
@@ -1743,18 +1928,20 @@ var ThreadsAPI = class {
1743
1928
  * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
1744
1929
  * @param threadId - The id of the thread to fetch the member from
1745
1930
  * @param userId - The id of the user
1931
+ * @param options - The options to use when fetching the member
1746
1932
  */
1747
- async getMember(threadId, userId) {
1748
- return this.rest.get(import_v109.Routes.threadMembers(threadId, userId));
1933
+ async getMember(threadId, userId, { signal } = {}) {
1934
+ return this.rest.get(import_v109.Routes.threadMembers(threadId, userId), { signal });
1749
1935
  }
1750
1936
  /**
1751
1937
  * Fetches all members of a thread
1752
1938
  *
1753
1939
  * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
1754
1940
  * @param threadId - The id of the thread to fetch the members from
1941
+ * @param options - The options to use when fetching the members
1755
1942
  */
1756
- async getAllMembers(threadId) {
1757
- return this.rest.get(import_v109.Routes.threadMembers(threadId));
1943
+ async getAllMembers(threadId, { signal } = {}) {
1944
+ return this.rest.get(import_v109.Routes.threadMembers(threadId), { signal });
1758
1945
  }
1759
1946
  };
1760
1947
  __name(ThreadsAPI, "ThreadsAPI");
@@ -1771,27 +1958,31 @@ var UsersAPI = class {
1771
1958
  *
1772
1959
  * @see {@link https://discord.com/developers/docs/resources/user#get-user}
1773
1960
  * @param userId - The id of the user to fetch
1961
+ * @param options - The options to use when fetching the user
1774
1962
  */
1775
- async get(userId) {
1776
- return this.rest.get(import_v1010.Routes.user(userId));
1963
+ async get(userId, { signal } = {}) {
1964
+ return this.rest.get(import_v1010.Routes.user(userId), { signal });
1777
1965
  }
1778
1966
  /**
1779
1967
  * Returns the user object of the requester's account
1780
1968
  *
1781
1969
  * @see {@link https://discord.com/developers/docs/resources/user#get-current-user}
1970
+ * @param options - The options to use when fetching the current user
1782
1971
  */
1783
- async getCurrent() {
1784
- return this.rest.get(import_v1010.Routes.user("@me"));
1972
+ async getCurrent({ signal } = {}) {
1973
+ return this.rest.get(import_v1010.Routes.user("@me"), { signal });
1785
1974
  }
1786
1975
  /**
1787
1976
  * Returns a list of partial guild objects the current user is a member of
1788
1977
  *
1789
1978
  * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds}
1790
- * @param options - The options to use when fetching the current user's guilds
1979
+ * @param query - The query options to use when fetching the current user's guilds
1980
+ * @param options - The options to use when fetching the guilds
1791
1981
  */
1792
- async getGuilds(options = {}) {
1982
+ async getGuilds(query = {}, { signal } = {}) {
1793
1983
  return this.rest.get(import_v1010.Routes.userGuilds(), {
1794
- query: (0, import_rest6.makeURLSearchParams)(options)
1984
+ query: (0, import_rest6.makeURLSearchParams)(query),
1985
+ signal
1795
1986
  });
1796
1987
  }
1797
1988
  /**
@@ -1799,40 +1990,44 @@ var UsersAPI = class {
1799
1990
  *
1800
1991
  * @see {@link https://discord.com/developers/docs/resources/user#leave-guild}
1801
1992
  * @param guildId - The id of the guild
1993
+ * @param options - The options for leaving the guild
1802
1994
  */
1803
- async leaveGuild(guildId) {
1804
- await this.rest.delete(import_v1010.Routes.userGuild(guildId));
1995
+ async leaveGuild(guildId, { signal } = {}) {
1996
+ await this.rest.delete(import_v1010.Routes.userGuild(guildId), { signal });
1805
1997
  }
1806
1998
  /**
1807
1999
  * Edits the current user
1808
2000
  *
1809
2001
  * @see {@link https://discord.com/developers/docs/resources/user#modify-current-user}
1810
- * @param user - The new data for the current user
2002
+ * @param body - The new data for the current user
2003
+ * @param options - The options for editing the user
1811
2004
  */
1812
- async edit(user) {
1813
- return this.rest.patch(import_v1010.Routes.user("@me"), { body: user });
2005
+ async edit(body, { signal } = {}) {
2006
+ return this.rest.patch(import_v1010.Routes.user("@me"), { body, signal });
1814
2007
  }
1815
2008
  /**
1816
2009
  * Fetches the guild member for the current user
1817
2010
  *
1818
2011
  * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member}
1819
2012
  * @param guildId - The id of the guild
2013
+ * @param options - The options for fetching the guild member
1820
2014
  */
1821
- async getGuildMember(guildId) {
1822
- return this.rest.get(import_v1010.Routes.userGuildMember(guildId));
2015
+ async getGuildMember(guildId, { signal } = {}) {
2016
+ return this.rest.get(import_v1010.Routes.userGuildMember(guildId), { signal });
1823
2017
  }
1824
2018
  /**
1825
2019
  * Edits the guild member for the current user
1826
2020
  *
1827
2021
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
1828
2022
  * @param guildId - The id of the guild
1829
- * @param member - The new data for the guild member
1830
- * @param reason - The reason for editing this guild member
2023
+ * @param body - The new data for the guild member
2024
+ * @param options - The options for editing the guild member
1831
2025
  */
1832
- async editGuildMember(guildId, member = {}, reason) {
2026
+ async editCurrentGuildMember(guildId, body = {}, { reason, signal } = {}) {
1833
2027
  return this.rest.patch(import_v1010.Routes.guildMember(guildId, "@me"), {
1834
2028
  reason,
1835
- body: member
2029
+ body,
2030
+ signal
1836
2031
  });
1837
2032
  }
1838
2033
  /**
@@ -1840,41 +2035,47 @@ var UsersAPI = class {
1840
2035
  *
1841
2036
  * @see {@link https://discord.com/developers/docs/resources/user#create-dm}
1842
2037
  * @param userId - The id of the user to open a DM channel with
2038
+ * @param options - The options for opening the DM
1843
2039
  */
1844
- async createDM(userId) {
2040
+ async createDM(userId, { signal } = {}) {
1845
2041
  return this.rest.post(import_v1010.Routes.userChannels(), {
1846
- body: { recipient_id: userId }
2042
+ body: { recipient_id: userId },
2043
+ signal
1847
2044
  });
1848
2045
  }
1849
2046
  /**
1850
2047
  * Gets the current user's connections
1851
2048
  *
1852
2049
  * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections}
2050
+ * @param options - The options for fetching the user's connections
1853
2051
  */
1854
- async getConnections() {
1855
- return this.rest.get(import_v1010.Routes.userConnections());
2052
+ async getConnections({ signal } = {}) {
2053
+ return this.rest.get(import_v1010.Routes.userConnections(), { signal });
1856
2054
  }
1857
2055
  /**
1858
2056
  * Gets the current user's active application role connection
1859
2057
  *
1860
2058
  * @see {@link https://discord.com/developers/docs/resources/user#get-user-application-role-connection}
1861
2059
  * @param applicationId - The id of the application
2060
+ * @param options - The options for fetching the role connections
1862
2061
  */
1863
- async getApplicationRoleConnection(applicationId) {
1864
- return this.rest.get(
1865
- import_v1010.Routes.userApplicationRoleConnection(applicationId)
1866
- );
2062
+ async getApplicationRoleConnection(applicationId, { signal } = {}) {
2063
+ return this.rest.get(import_v1010.Routes.userApplicationRoleConnection(applicationId), {
2064
+ signal
2065
+ });
1867
2066
  }
1868
2067
  /**
1869
2068
  * Updates the current user's application role connection
1870
2069
  *
1871
2070
  * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection}
1872
2071
  * @param applicationId - The id of the application
2072
+ * @param body - The data to use when updating the application role connection
1873
2073
  * @param options - The options to use when updating the application role connection
1874
2074
  */
1875
- async updateApplicationRoleConnection(applicationId, options) {
2075
+ async updateApplicationRoleConnection(applicationId, body, { signal } = {}) {
1876
2076
  return this.rest.put(import_v1010.Routes.userApplicationRoleConnection(applicationId), {
1877
- body: options
2077
+ body,
2078
+ signal
1878
2079
  });
1879
2080
  }
1880
2081
  };
@@ -1890,9 +2091,10 @@ var VoiceAPI = class {
1890
2091
  * Fetches all voice regions
1891
2092
  *
1892
2093
  * @see {@link https://discord.com/developers/docs/resources/voice#list-voice-regions}
2094
+ * @param options - The options to use when fetching the voice regions
1893
2095
  */
1894
- async getVoiceRegions() {
1895
- return this.rest.get(import_v1011.Routes.voiceRegions());
2096
+ async getVoiceRegions({ signal } = {}) {
2097
+ return this.rest.get(import_v1011.Routes.voiceRegions(), { signal });
1896
2098
  }
1897
2099
  };
1898
2100
  __name(VoiceAPI, "VoiceAPI");
@@ -1911,22 +2113,24 @@ var WebhooksAPI = class {
1911
2113
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token}
1912
2114
  * @param id - The id of the webhook
1913
2115
  * @param token - The token of the webhook
2116
+ * @param options - The options to use when fetching the webhook
1914
2117
  */
1915
- async get(id, token) {
1916
- return this.rest.get(import_v1012.Routes.webhook(id, token));
2118
+ async get(id, token, { signal } = {}) {
2119
+ return this.rest.get(import_v1012.Routes.webhook(id, token), { signal });
1917
2120
  }
1918
2121
  /**
1919
2122
  * Creates a new webhook
1920
2123
  *
1921
2124
  * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}
1922
2125
  * @param channelId - The id of the channel to create the webhook in
1923
- * @param data - The data to use when creating the webhook
1924
- * @param reason - The reason for creating the webhook
2126
+ * @param body - The data to use when creating the webhook
2127
+ * @param options - The options to use when creating the webhook
1925
2128
  */
1926
- async create(channelId, data, reason) {
2129
+ async create(channelId, body, { reason, signal } = {}) {
1927
2130
  return this.rest.post(import_v1012.Routes.channelWebhooks(channelId), {
1928
2131
  reason,
1929
- body: data
2132
+ body,
2133
+ signal
1930
2134
  });
1931
2135
  }
1932
2136
  /**
@@ -1935,11 +2139,15 @@ var WebhooksAPI = class {
1935
2139
  * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook}
1936
2140
  * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token}
1937
2141
  * @param id - The id of the webhook to edit
1938
- * @param webhook - The new webhook data
2142
+ * @param body - The new webhook data
1939
2143
  * @param options - The options to use when editing the webhook
1940
2144
  */
1941
- async edit(id, webhook, { token, reason } = {}) {
1942
- return this.rest.patch(import_v1012.Routes.webhook(id, token), { reason, body: webhook });
2145
+ async edit(id, body, { token, reason, signal } = {}) {
2146
+ return this.rest.patch(import_v1012.Routes.webhook(id, token), {
2147
+ reason,
2148
+ body,
2149
+ signal
2150
+ });
1943
2151
  }
1944
2152
  /**
1945
2153
  * Deletes a webhook
@@ -1949,8 +2157,8 @@ var WebhooksAPI = class {
1949
2157
  * @param id - The id of the webhook to delete
1950
2158
  * @param options - The options to use when deleting the webhook
1951
2159
  */
1952
- async delete(id, { token, reason } = {}) {
1953
- await this.rest.delete(import_v1012.Routes.webhook(id, token), { reason });
2160
+ async delete(id, { token, reason, signal } = {}) {
2161
+ await this.rest.delete(import_v1012.Routes.webhook(id, token), { reason, signal });
1954
2162
  }
1955
2163
  /**
1956
2164
  * Executes a webhook
@@ -1958,19 +2166,21 @@ var WebhooksAPI = class {
1958
2166
  * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}
1959
2167
  * @param id - The id of the webhook
1960
2168
  * @param token - The token of the webhook
1961
- * @param data - The data to use when executing the webhook
2169
+ * @param body - The data to use when executing the webhook
2170
+ * @param options - The options to use when executing the webhook
1962
2171
  */
1963
2172
  async execute(id, token, {
1964
2173
  wait,
1965
2174
  thread_id,
1966
2175
  files,
1967
2176
  ...body
1968
- }) {
2177
+ }, { signal } = {}) {
1969
2178
  return this.rest.post(import_v1012.Routes.webhook(id, token), {
1970
2179
  query: (0, import_rest7.makeURLSearchParams)({ wait, thread_id }),
1971
2180
  files,
1972
2181
  body,
1973
- auth: false
2182
+ auth: false,
2183
+ signal
1974
2184
  // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
1975
2185
  });
1976
2186
  }
@@ -1980,13 +2190,15 @@ var WebhooksAPI = class {
1980
2190
  * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook}
1981
2191
  * @param id - The id of the webhook
1982
2192
  * @param token - The token of the webhook
2193
+ * @param query - The query options to use when executing the webhook
1983
2194
  * @param options - The options to use when executing the webhook
1984
2195
  */
1985
- async executeSlack(id, token, body, options = {}) {
2196
+ async executeSlack(id, token, body, query = {}, { signal } = {}) {
1986
2197
  await this.rest.post(import_v1012.Routes.webhookPlatform(id, token, "slack"), {
1987
- query: (0, import_rest7.makeURLSearchParams)(options),
2198
+ query: (0, import_rest7.makeURLSearchParams)(query),
1988
2199
  body,
1989
- auth: false
2200
+ auth: false,
2201
+ signal
1990
2202
  });
1991
2203
  }
1992
2204
  /**
@@ -1995,12 +2207,14 @@ var WebhooksAPI = class {
1995
2207
  * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook}
1996
2208
  * @param id - The id of the webhook
1997
2209
  * @param token - The token of the webhook
2210
+ * @param query - The options to use when executing the webhook
1998
2211
  * @param options - The options to use when executing the webhook
1999
2212
  */
2000
- async executeGitHub(id, token, body, options = {}) {
2213
+ async executeGitHub(id, token, body, query = {}, { signal } = {}) {
2001
2214
  await this.rest.post(import_v1012.Routes.webhookPlatform(id, token, "github"), {
2002
- query: (0, import_rest7.makeURLSearchParams)(options),
2215
+ query: (0, import_rest7.makeURLSearchParams)(query),
2003
2216
  body,
2217
+ signal,
2004
2218
  auth: false
2005
2219
  });
2006
2220
  }
@@ -2011,12 +2225,14 @@ var WebhooksAPI = class {
2011
2225
  * @param id - The id of the webhook
2012
2226
  * @param token - The token of the webhook
2013
2227
  * @param messageId - The id of the message to fetch
2228
+ * @param query - The query options to use when fetching the message
2014
2229
  * @param options - The options to use when fetching the message
2015
2230
  */
2016
- async getMessage(id, token, messageId, options = {}) {
2231
+ async getMessage(id, token, messageId, query = {}, { signal } = {}) {
2017
2232
  return this.rest.get(import_v1012.Routes.webhookMessage(id, token, messageId), {
2018
- query: (0, import_rest7.makeURLSearchParams)(options),
2019
- auth: false
2233
+ query: (0, import_rest7.makeURLSearchParams)(query),
2234
+ auth: false,
2235
+ signal
2020
2236
  });
2021
2237
  }
2022
2238
  /**
@@ -2026,13 +2242,15 @@ var WebhooksAPI = class {
2026
2242
  * @param id - The id of the webhook
2027
2243
  * @param token - The token of the webhook
2028
2244
  * @param messageId - The id of the message to edit
2029
- * @param data - The data to use when editing the message
2245
+ * @param body - The data to use when editing the message
2246
+ * @param options - The options to use when editing the message
2030
2247
  */
2031
- async editMessage(id, token, messageId, { thread_id, ...body }) {
2248
+ async editMessage(id, token, messageId, { thread_id, ...body }, { signal } = {}) {
2032
2249
  return this.rest.patch(import_v1012.Routes.webhookMessage(id, token, messageId), {
2033
2250
  query: (0, import_rest7.makeURLSearchParams)({ thread_id }),
2034
2251
  auth: false,
2035
- body
2252
+ body,
2253
+ signal
2036
2254
  });
2037
2255
  }
2038
2256
  /**
@@ -2042,12 +2260,14 @@ var WebhooksAPI = class {
2042
2260
  * @param id - The id of the webhook
2043
2261
  * @param token - The token of the webhook
2044
2262
  * @param messageId - The id of the message to delete
2263
+ * @param query - The options to use when deleting the message
2045
2264
  * @param options - The options to use when deleting the message
2046
2265
  */
2047
- async deleteMessage(id, token, messageId, options = {}) {
2266
+ async deleteMessage(id, token, messageId, query = {}, { signal } = {}) {
2048
2267
  await this.rest.delete(import_v1012.Routes.webhookMessage(id, token, messageId), {
2049
- query: (0, import_rest7.makeURLSearchParams)(options),
2050
- auth: false
2268
+ query: (0, import_rest7.makeURLSearchParams)(query),
2269
+ auth: false,
2270
+ signal
2051
2271
  });
2052
2272
  }
2053
2273
  };
@@ -2198,6 +2418,7 @@ __name(withFiles, "withFiles");
2198
2418
 
2199
2419
  // src/index.ts
2200
2420
  __reExport(src_exports, require("discord-api-types/v10"), module.exports);
2421
+ var version = "0.5.0";
2201
2422
  // Annotate the CommonJS export names for ESM import in node:
2202
2423
  0 && (module.exports = {
2203
2424
  API,
@@ -2214,6 +2435,7 @@ __reExport(src_exports, require("discord-api-types/v10"), module.exports);
2214
2435
  UsersAPI,
2215
2436
  VoiceAPI,
2216
2437
  WebhooksAPI,
2438
+ version,
2217
2439
  withFiles
2218
2440
  });
2219
2441
  //# sourceMappingURL=index.js.map