@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/http-only.mjs
CHANGED
|
@@ -378,9 +378,17 @@ var ChannelsAPI = class {
|
|
|
378
378
|
* @see {@link https://discord.com/developers/docs/resources/message#get-reactions}
|
|
379
379
|
* @param channelId - The id of the channel the message is in
|
|
380
380
|
* @param messageId - The id of the message to get the reactions for
|
|
381
|
-
* @param emoji - The emoji to get the reactions for
|
|
381
|
+
* @param emoji - The emoji to get the reactions for. URL encoding happens internally
|
|
382
382
|
* @param query - The query options for fetching the reactions
|
|
383
383
|
* @param options - The options for fetching the message reactions
|
|
384
|
+
* @example
|
|
385
|
+
* ```ts
|
|
386
|
+
* // Unicode.
|
|
387
|
+
* await api.channels.getMessageReactions('1234567890', '1234567890', '👍');
|
|
388
|
+
*
|
|
389
|
+
* // Custom emoji.
|
|
390
|
+
* await api.channels.getMessageReactions('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
391
|
+
* ```
|
|
384
392
|
*/
|
|
385
393
|
async getMessageReactions(channelId, messageId, emoji, query = {}, { signal } = {}) {
|
|
386
394
|
return this.rest.get(Routes3.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), {
|
|
@@ -394,8 +402,16 @@ var ChannelsAPI = class {
|
|
|
394
402
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-own-reaction}
|
|
395
403
|
* @param channelId - The id of the channel the message is in
|
|
396
404
|
* @param messageId - The id of the message to delete the reaction for
|
|
397
|
-
* @param emoji - The emoji to delete the reaction for
|
|
405
|
+
* @param emoji - The emoji to delete the reaction for. URL encoding happens internally
|
|
398
406
|
* @param options - The options for deleting the reaction
|
|
407
|
+
* @example
|
|
408
|
+
* ```ts
|
|
409
|
+
* // Unicode.
|
|
410
|
+
* await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', '👍');
|
|
411
|
+
*
|
|
412
|
+
* // Custom emoji.
|
|
413
|
+
* await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
414
|
+
* ```
|
|
399
415
|
*/
|
|
400
416
|
async deleteOwnMessageReaction(channelId, messageId, emoji, { signal } = {}) {
|
|
401
417
|
await this.rest.delete(Routes3.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)), {
|
|
@@ -408,9 +424,17 @@ var ChannelsAPI = class {
|
|
|
408
424
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-user-reaction}
|
|
409
425
|
* @param channelId - The id of the channel the message is in
|
|
410
426
|
* @param messageId - The id of the message to delete the reaction for
|
|
411
|
-
* @param emoji - The emoji to delete the reaction for
|
|
427
|
+
* @param emoji - The emoji to delete the reaction for. URL encoding happens internally
|
|
412
428
|
* @param userId - The id of the user to delete the reaction for
|
|
413
429
|
* @param options - The options for deleting the reaction
|
|
430
|
+
* @example
|
|
431
|
+
* ```ts
|
|
432
|
+
* // Unicode.
|
|
433
|
+
* await api.channels.deleteUserMessageReaction('1234567890', '1234567890', '👍', '1234567890');
|
|
434
|
+
*
|
|
435
|
+
* // Custom emoji.
|
|
436
|
+
* await api.channels.deleteUserMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890', '1234567890');
|
|
437
|
+
* ```
|
|
414
438
|
*/
|
|
415
439
|
async deleteUserMessageReaction(channelId, messageId, emoji, userId, { signal } = {}) {
|
|
416
440
|
await this.rest.delete(Routes3.channelMessageUserReaction(channelId, messageId, encodeURIComponent(emoji), userId), {
|
|
@@ -434,8 +458,16 @@ var ChannelsAPI = class {
|
|
|
434
458
|
* @see {@link https://discord.com/developers/docs/resources/message#delete-all-reactions-for-emoji}
|
|
435
459
|
* @param channelId - The id of the channel the message is in
|
|
436
460
|
* @param messageId - The id of the message to delete the reactions for
|
|
437
|
-
* @param emoji - The emoji to delete the reactions for
|
|
461
|
+
* @param emoji - The emoji to delete the reactions for. URL encoding happens internally
|
|
438
462
|
* @param options - The options for deleting the reactions
|
|
463
|
+
* @example
|
|
464
|
+
* ```ts
|
|
465
|
+
* // Unicode.
|
|
466
|
+
* await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', '👍');
|
|
467
|
+
*
|
|
468
|
+
* // Custom emoji.
|
|
469
|
+
* await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
470
|
+
* ```
|
|
439
471
|
*/
|
|
440
472
|
async deleteAllMessageReactionsForEmoji(channelId, messageId, emoji, { signal } = {}) {
|
|
441
473
|
await this.rest.delete(Routes3.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), { signal });
|
|
@@ -446,8 +478,16 @@ var ChannelsAPI = class {
|
|
|
446
478
|
* @see {@link https://discord.com/developers/docs/resources/message#create-reaction}
|
|
447
479
|
* @param channelId - The id of the channel the message is in
|
|
448
480
|
* @param messageId - The id of the message to add the reaction to
|
|
449
|
-
* @param emoji - The emoji to add the reaction with
|
|
481
|
+
* @param emoji - The emoji to add the reaction with. URL encoding happens internally
|
|
450
482
|
* @param options - The options for adding the reaction
|
|
483
|
+
* @example
|
|
484
|
+
* ```ts
|
|
485
|
+
* // Unicode.
|
|
486
|
+
* await api.channels.addMessageReaction('1234567890', '1234567890', '👍');
|
|
487
|
+
*
|
|
488
|
+
* // Custom emoji.
|
|
489
|
+
* await api.channels.addMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
|
|
490
|
+
* ```
|
|
451
491
|
*/
|
|
452
492
|
async addMessageReaction(channelId, messageId, emoji, { signal } = {}) {
|
|
453
493
|
await this.rest.put(Routes3.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)), { signal });
|
|
@@ -2998,7 +3038,7 @@ __name(withFiles, "withFiles");
|
|
|
2998
3038
|
|
|
2999
3039
|
// src/http-only/index.ts
|
|
3000
3040
|
export * from "discord-api-types/v10";
|
|
3001
|
-
var version = "2.1.0-dev.
|
|
3041
|
+
var version = "2.1.0-dev.1731672302-3669d5e11";
|
|
3002
3042
|
export {
|
|
3003
3043
|
API,
|
|
3004
3044
|
ApplicationCommandsAPI,
|