@discordjs/core 2.5.0 → 2.6.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.
@@ -10,6 +10,7 @@ var ApplicationCommandsAPI = class {
10
10
  constructor(rest) {
11
11
  this.rest = rest;
12
12
  }
13
+ rest;
13
14
  static {
14
15
  __name(this, "ApplicationCommandsAPI");
15
16
  }
@@ -237,6 +238,7 @@ var ApplicationsAPI = class {
237
238
  constructor(rest) {
238
239
  this.rest = rest;
239
240
  }
241
+ rest;
240
242
  static {
241
243
  __name(this, "ApplicationsAPI");
242
244
  }
@@ -327,6 +329,19 @@ var ApplicationsAPI = class {
327
329
  async deleteEmoji(applicationId, emojiId, { signal } = {}) {
328
330
  await this.rest.delete(Routes2.applicationEmoji(applicationId, emojiId), { signal });
329
331
  }
332
+ /**
333
+ * Fetches an activity instance of an application
334
+ *
335
+ * @see {@link https://docs.discord.com/developers/resources/application#get-application-activity-instance}
336
+ * @param applicationId - The id of the application to fetch the activity instance of
337
+ * @param instanceId - The id of the activity instance to fetch
338
+ * @param options - The options for fetching the activity instance
339
+ */
340
+ async getActivityInstance(applicationId, instanceId, { signal } = {}) {
341
+ return this.rest.get(Routes2.applicationActivityInstance(applicationId, instanceId), {
342
+ signal
343
+ });
344
+ }
330
345
  };
331
346
 
332
347
  // src/api/channel.ts
@@ -338,6 +353,7 @@ var ChannelsAPI = class {
338
353
  constructor(rest) {
339
354
  this.rest = rest;
340
355
  }
356
+ rest;
341
357
  static {
342
358
  __name(this, "ChannelsAPI");
343
359
  }
@@ -762,7 +778,7 @@ var ChannelsAPI = class {
762
778
  * @param options - The options for sending the soundboard sound
763
779
  */
764
780
  async sendSoundboardSound(channelId, body, { signal } = {}) {
765
- return this.rest.post(Routes3.sendSoundboardSound(channelId), {
781
+ await this.rest.post(Routes3.sendSoundboardSound(channelId), {
766
782
  body,
767
783
  signal
768
784
  });
@@ -803,6 +819,7 @@ var GatewayAPI = class {
803
819
  constructor(rest) {
804
820
  this.rest = rest;
805
821
  }
822
+ rest;
806
823
  static {
807
824
  __name(this, "GatewayAPI");
808
825
  }
@@ -843,6 +860,7 @@ var VoiceAPI = class {
843
860
  constructor(rest) {
844
861
  this.rest = rest;
845
862
  }
863
+ rest;
846
864
  static {
847
865
  __name(this, "VoiceAPI");
848
866
  }
@@ -914,6 +932,7 @@ var GuildsAPI = class {
914
932
  constructor(rest) {
915
933
  this.rest = rest;
916
934
  }
935
+ rest;
917
936
  static {
918
937
  __name(this, "GuildsAPI");
919
938
  }
@@ -1957,6 +1976,18 @@ var GuildsAPI = class {
1957
1976
  signal
1958
1977
  });
1959
1978
  }
1979
+ /**
1980
+ * Fetches role member counts for a guild.
1981
+ *
1982
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
1983
+ * @param guildId - The id of the guild to fetch role member counts for
1984
+ * @param options - The options for fetching role member counts
1985
+ */
1986
+ async getRoleMemberCounts(guildId, { signal } = {}) {
1987
+ return this.rest.get(Routes6.guildRoleMemberCounts(guildId), {
1988
+ signal
1989
+ });
1990
+ }
1960
1991
  };
1961
1992
 
1962
1993
  // src/api/interactions.ts
@@ -1970,6 +2001,8 @@ var InteractionsAPI = class {
1970
2001
  this.rest = rest;
1971
2002
  this.webhooks = webhooks;
1972
2003
  }
2004
+ rest;
2005
+ webhooks;
1973
2006
  static {
1974
2007
  __name(this, "InteractionsAPI");
1975
2008
  }
@@ -2144,6 +2177,7 @@ var InvitesAPI = class {
2144
2177
  constructor(rest) {
2145
2178
  this.rest = rest;
2146
2179
  }
2180
+ rest;
2147
2181
  static {
2148
2182
  __name(this, "InvitesAPI");
2149
2183
  }
@@ -2182,6 +2216,7 @@ var MonetizationAPI = class {
2182
2216
  constructor(rest) {
2183
2217
  this.rest = rest;
2184
2218
  }
2219
+ rest;
2185
2220
  static {
2186
2221
  __name(this, "MonetizationAPI");
2187
2222
  }
@@ -2297,6 +2332,7 @@ var OAuth2API = class {
2297
2332
  constructor(rest) {
2298
2333
  this.rest = rest;
2299
2334
  }
2335
+ rest;
2300
2336
  static {
2301
2337
  __name(this, "OAuth2API");
2302
2338
  }
@@ -2421,6 +2457,7 @@ var PollAPI = class {
2421
2457
  constructor(rest) {
2422
2458
  this.rest = rest;
2423
2459
  }
2460
+ rest;
2424
2461
  static {
2425
2462
  __name(this, "PollAPI");
2426
2463
  }
@@ -2463,6 +2500,7 @@ var RoleConnectionsAPI = class {
2463
2500
  constructor(rest) {
2464
2501
  this.rest = rest;
2465
2502
  }
2503
+ rest;
2466
2504
  static {
2467
2505
  __name(this, "RoleConnectionsAPI");
2468
2506
  }
@@ -2500,6 +2538,7 @@ var SoundboardSoundsAPI = class {
2500
2538
  constructor(rest) {
2501
2539
  this.rest = rest;
2502
2540
  }
2541
+ rest;
2503
2542
  static {
2504
2543
  __name(this, "SoundboardSoundsAPI");
2505
2544
  }
@@ -2524,6 +2563,7 @@ var StageInstancesAPI = class {
2524
2563
  constructor(rest) {
2525
2564
  this.rest = rest;
2526
2565
  }
2566
+ rest;
2527
2567
  static {
2528
2568
  __name(this, "StageInstancesAPI");
2529
2569
  }
@@ -2586,6 +2626,7 @@ var StickersAPI = class {
2586
2626
  constructor(rest) {
2587
2627
  this.rest = rest;
2588
2628
  }
2629
+ rest;
2589
2630
  static {
2590
2631
  __name(this, "StickersAPI");
2591
2632
  }
@@ -2638,6 +2679,7 @@ var ThreadsAPI = class {
2638
2679
  constructor(rest) {
2639
2680
  this.rest = rest;
2640
2681
  }
2682
+ rest;
2641
2683
  static {
2642
2684
  __name(this, "ThreadsAPI");
2643
2685
  }
@@ -2715,6 +2757,7 @@ var UsersAPI = class {
2715
2757
  constructor(rest) {
2716
2758
  this.rest = rest;
2717
2759
  }
2760
+ rest;
2718
2761
  static {
2719
2762
  __name(this, "UsersAPI");
2720
2763
  }
@@ -2854,6 +2897,7 @@ var WebhooksAPI = class {
2854
2897
  constructor(rest) {
2855
2898
  this.rest = rest;
2856
2899
  }
2900
+ rest;
2857
2901
  static {
2858
2902
  __name(this, "WebhooksAPI");
2859
2903
  }
@@ -3036,6 +3080,7 @@ var API = class {
3036
3080
  this.webhooks = new WebhooksAPI(rest);
3037
3081
  this.interactions = new InteractionsAPI(rest, this.webhooks);
3038
3082
  }
3083
+ rest;
3039
3084
  static {
3040
3085
  __name(this, "API");
3041
3086
  }
@@ -3078,7 +3123,7 @@ __name(withFiles, "withFiles");
3078
3123
 
3079
3124
  // src/http-only/index.ts
3080
3125
  export * from "discord-api-types/v10";
3081
- var version = "2.5.0";
3126
+ var version = "2.6.0";
3082
3127
  export {
3083
3128
  API,
3084
3129
  ApplicationCommandsAPI,