@discordjs/core 2.1.0-dev.1731413115-e2df0e0db → 2.1.0-dev.1731672302-3669d5e11
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/http-only.d.mts +45 -5
- package/dist/http-only.d.ts +45 -5
- package/dist/http-only.js +46 -6
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +46 -6
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +45 -5
- package/dist/index.d.ts +45 -5
- package/dist/index.js +46 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -261,9 +261,17 @@ declare class ChannelsAPI {
|
|
|
261
261
|
* @see {@link https://discord.com/developers/docs/resources/message#get-reactions}
|
|
262
262
|
* @param channelId - The id of the channel the message is in
|
|
263
263
|
* @param messageId - The id of the message to get the reactions for
|
|
264
|
-
* @param emoji - The emoji to get the reactions for
|
|
264
|
+
* @param emoji - The emoji to get the reactions for. URL encoding happens internally
|
|
265
265
|
* @param query - The query options for fetching the reactions
|
|
266
266
|
* @param options - The options for fetching the message reactions
|
|
267
|
+
* @example
|
|
268
|
+
* ```ts
|
|
269
|
+
* // Unicode.
|
|
270
|
+
* await api.channels.getMessageReactions('1234567890', '1234567890', '👍');
|
|
271
|
+
*
|
|
272
|
+
* // Custom emoji.
|
|
273
|
+
* await api.channels.getMessageReactions('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
274
|
+
* ```
|
|
267
275
|
*/
|
|
268
276
|
getMessageReactions(channelId: Snowflake, messageId: Snowflake, emoji: string, query?: RESTGetAPIChannelMessageReactionUsersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelMessageReactionUsersResult>;
|
|
269
277
|
/**
|
|
@@ -272,8 +280,16 @@ declare class ChannelsAPI {
|
|
|
272
280
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-own-reaction}
|
|
273
281
|
* @param channelId - The id of the channel the message is in
|
|
274
282
|
* @param messageId - The id of the message to delete the reaction for
|
|
275
|
-
* @param emoji - The emoji to delete the reaction for
|
|
283
|
+
* @param emoji - The emoji to delete the reaction for. URL encoding happens internally
|
|
276
284
|
* @param options - The options for deleting the reaction
|
|
285
|
+
* @example
|
|
286
|
+
* ```ts
|
|
287
|
+
* // Unicode.
|
|
288
|
+
* await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', '👍');
|
|
289
|
+
*
|
|
290
|
+
* // Custom emoji.
|
|
291
|
+
* await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
292
|
+
* ```
|
|
277
293
|
*/
|
|
278
294
|
deleteOwnMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
279
295
|
/**
|
|
@@ -282,9 +298,17 @@ declare class ChannelsAPI {
|
|
|
282
298
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-user-reaction}
|
|
283
299
|
* @param channelId - The id of the channel the message is in
|
|
284
300
|
* @param messageId - The id of the message to delete the reaction for
|
|
285
|
-
* @param emoji - The emoji to delete the reaction for
|
|
301
|
+
* @param emoji - The emoji to delete the reaction for. URL encoding happens internally
|
|
286
302
|
* @param userId - The id of the user to delete the reaction for
|
|
287
303
|
* @param options - The options for deleting the reaction
|
|
304
|
+
* @example
|
|
305
|
+
* ```ts
|
|
306
|
+
* // Unicode.
|
|
307
|
+
* await api.channels.deleteUserMessageReaction('1234567890', '1234567890', '👍', '1234567890');
|
|
308
|
+
*
|
|
309
|
+
* // Custom emoji.
|
|
310
|
+
* await api.channels.deleteUserMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890', '1234567890');
|
|
311
|
+
* ```
|
|
288
312
|
*/
|
|
289
313
|
deleteUserMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
290
314
|
/**
|
|
@@ -302,8 +326,16 @@ declare class ChannelsAPI {
|
|
|
302
326
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-all-reactions-for-emoji}
|
|
303
327
|
* @param channelId - The id of the channel the message is in
|
|
304
328
|
* @param messageId - The id of the message to delete the reactions for
|
|
305
|
-
* @param emoji - The emoji to delete the reactions for
|
|
329
|
+
* @param emoji - The emoji to delete the reactions for. URL encoding happens internally
|
|
306
330
|
* @param options - The options for deleting the reactions
|
|
331
|
+
* @example
|
|
332
|
+
* ```ts
|
|
333
|
+
* // Unicode.
|
|
334
|
+
* await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', '👍');
|
|
335
|
+
*
|
|
336
|
+
* // Custom emoji.
|
|
337
|
+
* await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
338
|
+
* ```
|
|
307
339
|
*/
|
|
308
340
|
deleteAllMessageReactionsForEmoji(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
309
341
|
/**
|
|
@@ -312,8 +344,16 @@ declare class ChannelsAPI {
|
|
|
312
344
|
* @see {@link https://discord.com/developers/docs/resources/message#create-reaction}
|
|
313
345
|
* @param channelId - The id of the channel the message is in
|
|
314
346
|
* @param messageId - The id of the message to add the reaction to
|
|
315
|
-
* @param emoji - The emoji to add the reaction with
|
|
347
|
+
* @param emoji - The emoji to add the reaction with. URL encoding happens internally
|
|
316
348
|
* @param options - The options for adding the reaction
|
|
349
|
+
* @example
|
|
350
|
+
* ```ts
|
|
351
|
+
* // Unicode.
|
|
352
|
+
* await api.channels.addMessageReaction('1234567890', '1234567890', '👍');
|
|
353
|
+
*
|
|
354
|
+
* // Custom emoji.
|
|
355
|
+
* await api.channels.addMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
356
|
+
* ```
|
|
317
357
|
*/
|
|
318
358
|
addMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
319
359
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -261,9 +261,17 @@ declare class ChannelsAPI {
|
|
|
261
261
|
* @see {@link https://discord.com/developers/docs/resources/message#get-reactions}
|
|
262
262
|
* @param channelId - The id of the channel the message is in
|
|
263
263
|
* @param messageId - The id of the message to get the reactions for
|
|
264
|
-
* @param emoji - The emoji to get the reactions for
|
|
264
|
+
* @param emoji - The emoji to get the reactions for. URL encoding happens internally
|
|
265
265
|
* @param query - The query options for fetching the reactions
|
|
266
266
|
* @param options - The options for fetching the message reactions
|
|
267
|
+
* @example
|
|
268
|
+
* ```ts
|
|
269
|
+
* // Unicode.
|
|
270
|
+
* await api.channels.getMessageReactions('1234567890', '1234567890', '👍');
|
|
271
|
+
*
|
|
272
|
+
* // Custom emoji.
|
|
273
|
+
* await api.channels.getMessageReactions('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
274
|
+
* ```
|
|
267
275
|
*/
|
|
268
276
|
getMessageReactions(channelId: Snowflake, messageId: Snowflake, emoji: string, query?: RESTGetAPIChannelMessageReactionUsersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelMessageReactionUsersResult>;
|
|
269
277
|
/**
|
|
@@ -272,8 +280,16 @@ declare class ChannelsAPI {
|
|
|
272
280
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-own-reaction}
|
|
273
281
|
* @param channelId - The id of the channel the message is in
|
|
274
282
|
* @param messageId - The id of the message to delete the reaction for
|
|
275
|
-
* @param emoji - The emoji to delete the reaction for
|
|
283
|
+
* @param emoji - The emoji to delete the reaction for. URL encoding happens internally
|
|
276
284
|
* @param options - The options for deleting the reaction
|
|
285
|
+
* @example
|
|
286
|
+
* ```ts
|
|
287
|
+
* // Unicode.
|
|
288
|
+
* await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', '👍');
|
|
289
|
+
*
|
|
290
|
+
* // Custom emoji.
|
|
291
|
+
* await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
292
|
+
* ```
|
|
277
293
|
*/
|
|
278
294
|
deleteOwnMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
279
295
|
/**
|
|
@@ -282,9 +298,17 @@ declare class ChannelsAPI {
|
|
|
282
298
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-user-reaction}
|
|
283
299
|
* @param channelId - The id of the channel the message is in
|
|
284
300
|
* @param messageId - The id of the message to delete the reaction for
|
|
285
|
-
* @param emoji - The emoji to delete the reaction for
|
|
301
|
+
* @param emoji - The emoji to delete the reaction for. URL encoding happens internally
|
|
286
302
|
* @param userId - The id of the user to delete the reaction for
|
|
287
303
|
* @param options - The options for deleting the reaction
|
|
304
|
+
* @example
|
|
305
|
+
* ```ts
|
|
306
|
+
* // Unicode.
|
|
307
|
+
* await api.channels.deleteUserMessageReaction('1234567890', '1234567890', '👍', '1234567890');
|
|
308
|
+
*
|
|
309
|
+
* // Custom emoji.
|
|
310
|
+
* await api.channels.deleteUserMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890', '1234567890');
|
|
311
|
+
* ```
|
|
288
312
|
*/
|
|
289
313
|
deleteUserMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
290
314
|
/**
|
|
@@ -302,8 +326,16 @@ declare class ChannelsAPI {
|
|
|
302
326
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-all-reactions-for-emoji}
|
|
303
327
|
* @param channelId - The id of the channel the message is in
|
|
304
328
|
* @param messageId - The id of the message to delete the reactions for
|
|
305
|
-
* @param emoji - The emoji to delete the reactions for
|
|
329
|
+
* @param emoji - The emoji to delete the reactions for. URL encoding happens internally
|
|
306
330
|
* @param options - The options for deleting the reactions
|
|
331
|
+
* @example
|
|
332
|
+
* ```ts
|
|
333
|
+
* // Unicode.
|
|
334
|
+
* await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', '👍');
|
|
335
|
+
*
|
|
336
|
+
* // Custom emoji.
|
|
337
|
+
* await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
338
|
+
* ```
|
|
307
339
|
*/
|
|
308
340
|
deleteAllMessageReactionsForEmoji(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
309
341
|
/**
|
|
@@ -312,8 +344,16 @@ declare class ChannelsAPI {
|
|
|
312
344
|
* @see {@link https://discord.com/developers/docs/resources/message#create-reaction}
|
|
313
345
|
* @param channelId - The id of the channel the message is in
|
|
314
346
|
* @param messageId - The id of the message to add the reaction to
|
|
315
|
-
* @param emoji - The emoji to add the reaction with
|
|
347
|
+
* @param emoji - The emoji to add the reaction with. URL encoding happens internally
|
|
316
348
|
* @param options - The options for adding the reaction
|
|
349
|
+
* @example
|
|
350
|
+
* ```ts
|
|
351
|
+
* // Unicode.
|
|
352
|
+
* await api.channels.addMessageReaction('1234567890', '1234567890', '👍');
|
|
353
|
+
*
|
|
354
|
+
* // Custom emoji.
|
|
355
|
+
* await api.channels.addMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
356
|
+
* ```
|
|
317
357
|
*/
|
|
318
358
|
addMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
319
359
|
/**
|
package/dist/index.js
CHANGED
|
@@ -417,9 +417,17 @@ var ChannelsAPI = class {
|
|
|
417
417
|
* @see {@link https://discord.com/developers/docs/resources/message#get-reactions}
|
|
418
418
|
* @param channelId - The id of the channel the message is in
|
|
419
419
|
* @param messageId - The id of the message to get the reactions for
|
|
420
|
-
* @param emoji - The emoji to get the reactions for
|
|
420
|
+
* @param emoji - The emoji to get the reactions for. URL encoding happens internally
|
|
421
421
|
* @param query - The query options for fetching the reactions
|
|
422
422
|
* @param options - The options for fetching the message reactions
|
|
423
|
+
* @example
|
|
424
|
+
* ```ts
|
|
425
|
+
* // Unicode.
|
|
426
|
+
* await api.channels.getMessageReactions('1234567890', '1234567890', '👍');
|
|
427
|
+
*
|
|
428
|
+
* // Custom emoji.
|
|
429
|
+
* await api.channels.getMessageReactions('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
430
|
+
* ```
|
|
423
431
|
*/
|
|
424
432
|
async getMessageReactions(channelId, messageId, emoji, query = {}, { signal } = {}) {
|
|
425
433
|
return this.rest.get(import_v103.Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), {
|
|
@@ -433,8 +441,16 @@ var ChannelsAPI = class {
|
|
|
433
441
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-own-reaction}
|
|
434
442
|
* @param channelId - The id of the channel the message is in
|
|
435
443
|
* @param messageId - The id of the message to delete the reaction for
|
|
436
|
-
* @param emoji - The emoji to delete the reaction for
|
|
444
|
+
* @param emoji - The emoji to delete the reaction for. URL encoding happens internally
|
|
437
445
|
* @param options - The options for deleting the reaction
|
|
446
|
+
* @example
|
|
447
|
+
* ```ts
|
|
448
|
+
* // Unicode.
|
|
449
|
+
* await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', '👍');
|
|
450
|
+
*
|
|
451
|
+
* // Custom emoji.
|
|
452
|
+
* await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
453
|
+
* ```
|
|
438
454
|
*/
|
|
439
455
|
async deleteOwnMessageReaction(channelId, messageId, emoji, { signal } = {}) {
|
|
440
456
|
await this.rest.delete(import_v103.Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)), {
|
|
@@ -447,9 +463,17 @@ var ChannelsAPI = class {
|
|
|
447
463
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-user-reaction}
|
|
448
464
|
* @param channelId - The id of the channel the message is in
|
|
449
465
|
* @param messageId - The id of the message to delete the reaction for
|
|
450
|
-
* @param emoji - The emoji to delete the reaction for
|
|
466
|
+
* @param emoji - The emoji to delete the reaction for. URL encoding happens internally
|
|
451
467
|
* @param userId - The id of the user to delete the reaction for
|
|
452
468
|
* @param options - The options for deleting the reaction
|
|
469
|
+
* @example
|
|
470
|
+
* ```ts
|
|
471
|
+
* // Unicode.
|
|
472
|
+
* await api.channels.deleteUserMessageReaction('1234567890', '1234567890', '👍', '1234567890');
|
|
473
|
+
*
|
|
474
|
+
* // Custom emoji.
|
|
475
|
+
* await api.channels.deleteUserMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890', '1234567890');
|
|
476
|
+
* ```
|
|
453
477
|
*/
|
|
454
478
|
async deleteUserMessageReaction(channelId, messageId, emoji, userId, { signal } = {}) {
|
|
455
479
|
await this.rest.delete(import_v103.Routes.channelMessageUserReaction(channelId, messageId, encodeURIComponent(emoji), userId), {
|
|
@@ -473,8 +497,16 @@ var ChannelsAPI = class {
|
|
|
473
497
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-all-reactions-for-emoji}
|
|
474
498
|
* @param channelId - The id of the channel the message is in
|
|
475
499
|
* @param messageId - The id of the message to delete the reactions for
|
|
476
|
-
* @param emoji - The emoji to delete the reactions for
|
|
500
|
+
* @param emoji - The emoji to delete the reactions for. URL encoding happens internally
|
|
477
501
|
* @param options - The options for deleting the reactions
|
|
502
|
+
* @example
|
|
503
|
+
* ```ts
|
|
504
|
+
* // Unicode.
|
|
505
|
+
* await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', '👍');
|
|
506
|
+
*
|
|
507
|
+
* // Custom emoji.
|
|
508
|
+
* await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
509
|
+
* ```
|
|
478
510
|
*/
|
|
479
511
|
async deleteAllMessageReactionsForEmoji(channelId, messageId, emoji, { signal } = {}) {
|
|
480
512
|
await this.rest.delete(import_v103.Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), { signal });
|
|
@@ -485,8 +517,16 @@ var ChannelsAPI = class {
|
|
|
485
517
|
* @see {@link https://discord.com/developers/docs/resources/message#create-reaction}
|
|
486
518
|
* @param channelId - The id of the channel the message is in
|
|
487
519
|
* @param messageId - The id of the message to add the reaction to
|
|
488
|
-
* @param emoji - The emoji to add the reaction with
|
|
520
|
+
* @param emoji - The emoji to add the reaction with. URL encoding happens internally
|
|
489
521
|
* @param options - The options for adding the reaction
|
|
522
|
+
* @example
|
|
523
|
+
* ```ts
|
|
524
|
+
* // Unicode.
|
|
525
|
+
* await api.channels.addMessageReaction('1234567890', '1234567890', '👍');
|
|
526
|
+
*
|
|
527
|
+
* // Custom emoji.
|
|
528
|
+
* await api.channels.addMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
529
|
+
* ```
|
|
490
530
|
*/
|
|
491
531
|
async addMessageReaction(channelId, messageId, emoji, { signal } = {}) {
|
|
492
532
|
await this.rest.put(import_v103.Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)), { signal });
|
|
@@ -3157,7 +3197,7 @@ __name(withFiles, "withFiles");
|
|
|
3157
3197
|
|
|
3158
3198
|
// src/index.ts
|
|
3159
3199
|
__reExport(src_exports, require("discord-api-types/v10"), module.exports);
|
|
3160
|
-
var version = "2.1.0-dev.
|
|
3200
|
+
var version = "2.1.0-dev.1731672302-3669d5e11";
|
|
3161
3201
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3162
3202
|
0 && (module.exports = {
|
|
3163
3203
|
API,
|