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