disgroove 2.2.4-dev.e509559 → 2.2.5-dev.3beface

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.
Files changed (39) hide show
  1. package/README.md +1 -0
  2. package/dist/lib/Client.d.ts +76 -9
  3. package/dist/lib/Client.js +248 -77
  4. package/dist/lib/constants.d.ts +78 -10
  5. package/dist/lib/constants.js +79 -6
  6. package/dist/lib/gateway/Shard.d.ts +3 -1
  7. package/dist/lib/gateway/Shard.js +51 -0
  8. package/dist/lib/rest/Endpoints.d.ts +9 -1
  9. package/dist/lib/rest/Endpoints.js +24 -4
  10. package/dist/lib/transformers/ApplicationCommands.js +2 -0
  11. package/dist/lib/transformers/Applications.js +2 -0
  12. package/dist/lib/transformers/Interactions.d.ts +3 -1
  13. package/dist/lib/transformers/Interactions.js +42 -0
  14. package/dist/lib/transformers/Soundboards.d.ts +5 -0
  15. package/dist/lib/transformers/Soundboards.js +31 -0
  16. package/dist/lib/transformers/Stickers.js +0 -2
  17. package/dist/lib/transformers/Subscriptions.d.ts +5 -0
  18. package/dist/lib/transformers/Subscriptions.js +32 -0
  19. package/dist/lib/transformers/index.d.ts +2 -0
  20. package/dist/lib/transformers/index.js +2 -0
  21. package/dist/lib/types/application-command.d.ts +3 -1
  22. package/dist/lib/types/application.d.ts +31 -1
  23. package/dist/lib/types/entitlements.d.ts +1 -1
  24. package/dist/lib/types/gateway-events.d.ts +43 -1
  25. package/dist/lib/types/guild.d.ts +2 -0
  26. package/dist/lib/types/interaction.d.ts +44 -0
  27. package/dist/lib/types/message.d.ts +26 -5
  28. package/dist/lib/types/sku.d.ts +1 -1
  29. package/dist/lib/types/soundboard.d.ts +23 -0
  30. package/dist/lib/types/soundboard.js +2 -0
  31. package/dist/lib/types/sticker.d.ts +0 -2
  32. package/dist/lib/types/subscription.d.ts +25 -0
  33. package/dist/lib/types/subscription.js +2 -0
  34. package/dist/lib/utils/CDN.d.ts +1 -0
  35. package/dist/lib/utils/CDN.js +3 -1
  36. package/dist/lib/utils/formatters.d.ts +2 -2
  37. package/dist/lib/utils/formatters.js +5 -2
  38. package/dist/package.json +4 -4
  39. package/package.json +35 -35
@@ -160,7 +160,7 @@ class Client extends node_events_1.default {
160
160
  this.shards.set(i, new gateway_1.Shard(i, this));
161
161
  this.shards.forEach((shard) => shard.connect());
162
162
  }
163
- /** https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement */
163
+ /** https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement */
164
164
  consumeEntitlement(applicationID, entitlementID) {
165
165
  this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEntitlementConsume(applicationID, entitlementID));
166
166
  }
@@ -418,6 +418,20 @@ class Client extends node_events_1.default {
418
418
  });
419
419
  return transformers_1.Stickers.stickerFromRaw(response);
420
420
  }
421
+ /** https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound */
422
+ async createGuildSoundboardSound(guildID, options, reason) {
423
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSounds(guildID), {
424
+ json: {
425
+ name: options.name,
426
+ sound: options.sound,
427
+ volume: options.volume,
428
+ emoji_id: options.emojiID,
429
+ emoji_name: options.emojiName,
430
+ },
431
+ reason,
432
+ });
433
+ return transformers_1.Soundboards.soundboardSoundFromRaw(response);
434
+ }
421
435
  /** https://discord.com/developers/docs/resources/guild-template#create-guild-template */
422
436
  async createGuildTemplate(guildID, options) {
423
437
  const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildTemplates(guildID), {
@@ -469,106 +483,118 @@ class Client extends node_events_1.default {
469
483
  return transformers_1.Messages.messageFromRaw(response);
470
484
  }
471
485
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response */
472
- createInteractionResponse(interactionID, interactionToken, options) {
486
+ async createInteractionResponse(interactionID, interactionToken, options) {
487
+ let json;
488
+ let files;
473
489
  switch (options.type) {
474
490
  case constants_1.InteractionCallbackType.ChannelMessageWithSource:
475
491
  case constants_1.InteractionCallbackType.UpdateMessage:
476
492
  {
477
- this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
478
- json: {
479
- type: options.type,
480
- data: {
481
- content: options.data?.content,
482
- embeds: options.data?.embeds !== undefined
483
- ? options.data.embeds.map((embed) => transformers_1.Messages.embedToRaw(embed))
484
- : undefined,
485
- allowed_mentions: options.data?.allowedMentions !== undefined
486
- ? {
487
- parse: options.data.allowedMentions.parse,
488
- roles: options.data.allowedMentions.roles,
489
- users: options.data.allowedMentions.users,
490
- replied_user: options.data.allowedMentions.repliedUser,
491
- }
492
- : undefined,
493
- flags: options.data?.flags,
494
- components: options.data?.components !== undefined
495
- ? transformers_1.Messages.componentsToRaw(options.data.components)
496
- : undefined,
497
- attachments: options.data?.attachments,
498
- poll: options.data?.poll !== undefined
499
- ? {
500
- question: options.data.poll.question,
501
- answers: options.data.poll.answers.map((answer) => ({
502
- answer_id: answer.answerID,
503
- poll_media: answer.pollMedia,
504
- })),
505
- duration: options.data.poll.duration,
506
- allow_multiselect: options.data.poll.allowMultiselect,
507
- layout_type: options.data.poll.layoutType,
508
- }
509
- : undefined,
510
- },
493
+ json = {
494
+ type: options.type,
495
+ data: {
496
+ content: options.data?.content,
497
+ embeds: options.data?.embeds !== undefined
498
+ ? options.data.embeds.map((embed) => transformers_1.Messages.embedToRaw(embed))
499
+ : undefined,
500
+ allowed_mentions: options.data?.allowedMentions !== undefined
501
+ ? {
502
+ parse: options.data.allowedMentions.parse,
503
+ roles: options.data.allowedMentions.roles,
504
+ users: options.data.allowedMentions.users,
505
+ replied_user: options.data.allowedMentions.repliedUser,
506
+ }
507
+ : undefined,
508
+ flags: options.data?.flags,
509
+ components: options.data?.components !== undefined
510
+ ? transformers_1.Messages.componentsToRaw(options.data.components)
511
+ : undefined,
512
+ attachments: options.data?.attachments,
513
+ poll: options.data?.poll !== undefined
514
+ ? {
515
+ question: options.data.poll.question,
516
+ answers: options.data.poll.answers.map((answer) => ({
517
+ answer_id: answer.answerID,
518
+ poll_media: answer.pollMedia,
519
+ })),
520
+ duration: options.data.poll.duration,
521
+ allow_multiselect: options.data.poll.allowMultiselect,
522
+ layout_type: options.data.poll.layoutType,
523
+ }
524
+ : undefined,
511
525
  },
512
- files: options.data?.files,
513
- });
526
+ };
527
+ files = options.data?.files;
514
528
  }
515
529
  break;
516
530
  case constants_1.InteractionCallbackType.DeferredChannelMessageWithSource:
517
531
  case constants_1.InteractionCallbackType.DeferredUpdateMessage:
518
532
  {
519
- this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
520
- json: {
521
- type: options.type,
522
- data: {
523
- flags: options.data?.flags,
524
- },
533
+ json = {
534
+ type: options.type,
535
+ data: {
536
+ flags: options.data?.flags,
525
537
  },
526
- });
538
+ };
527
539
  }
528
540
  break;
529
541
  case constants_1.InteractionCallbackType.ApplicationCommandAutocompleteResult:
530
542
  {
531
- this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
532
- json: {
533
- type: options.type,
534
- data: {
535
- choices: options.data?.choices?.map((choice) => ({
536
- name: choice.name,
537
- name_localizations: choice.nameLocalizations,
538
- value: choice.value,
539
- })),
540
- },
543
+ json = {
544
+ type: options.type,
545
+ data: {
546
+ choices: options.data?.choices?.map((choice) => ({
547
+ name: choice.name,
548
+ name_localizations: choice.nameLocalizations,
549
+ value: choice.value,
550
+ })),
541
551
  },
542
- });
552
+ };
543
553
  }
544
554
  break;
545
555
  case constants_1.InteractionCallbackType.Modal:
546
556
  {
547
- this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
548
- json: {
549
- type: options.type,
550
- data: {
551
- custom_id: options.data?.customID,
552
- components: options.data?.components !== undefined
553
- ? transformers_1.Messages.componentsToRaw(options.data.components)
554
- : undefined,
555
- title: options.data?.title,
556
- },
557
+ json = {
558
+ type: options.type,
559
+ data: {
560
+ custom_id: options.data?.customID,
561
+ components: options.data?.components !== undefined
562
+ ? transformers_1.Messages.componentsToRaw(options.data.components)
563
+ : undefined,
564
+ title: options.data?.title,
557
565
  },
558
- });
566
+ };
559
567
  }
560
568
  break;
561
569
  case constants_1.InteractionCallbackType.PremiumRequired:
570
+ case constants_1.InteractionCallbackType.LaunchActivity:
562
571
  {
563
- this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
564
- json: {
565
- type: options.type,
566
- data: {},
567
- },
568
- });
572
+ json = {
573
+ type: options.type,
574
+ data: {},
575
+ };
569
576
  }
570
577
  break;
571
578
  }
579
+ if (options.withResponse) {
580
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
581
+ json,
582
+ query: {
583
+ with_response: options.withResponse,
584
+ },
585
+ files,
586
+ });
587
+ return transformers_1.Interactions.interactionCallbackResponseFromRaw(response);
588
+ }
589
+ else {
590
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
591
+ json,
592
+ query: {
593
+ with_response: options.withResponse,
594
+ },
595
+ files,
596
+ });
597
+ }
572
598
  }
573
599
  /** https://discord.com/developers/docs/resources/message#create-message */
574
600
  async createMessage(channelID, options) {
@@ -636,7 +662,7 @@ class Client extends node_events_1.default {
636
662
  });
637
663
  return transformers_1.StageInstances.stageInstanceFromRaw(response);
638
664
  }
639
- /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
665
+ /** https://discord.com/developers/docs/resources/entitlement#create-test-entitlement */
640
666
  async createTestEntitlement(applicationID, options) {
641
667
  const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEntitlements(applicationID), {
642
668
  json: {
@@ -774,6 +800,12 @@ class Client extends node_events_1.default {
774
800
  reason,
775
801
  });
776
802
  }
803
+ /** https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound */
804
+ deleteGuildSoundboardSound(guildID, soundID, reason) {
805
+ this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildID, soundID), {
806
+ reason,
807
+ });
808
+ }
777
809
  /** https://discord.com/developers/docs/resources/guild-template#delete-guild-template */
778
810
  async deleteGuildTemplate(guildID, code) {
779
811
  const response = await this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildTemplate(guildID, code));
@@ -1159,7 +1191,9 @@ class Client extends node_events_1.default {
1159
1191
  status: options.status,
1160
1192
  image: options.image,
1161
1193
  recurrence_rule: options.recurrenceRule !== undefined
1162
- ? transformers_1.GuildScheduledEvents.guildScheduledEventRecurrenceRuleToRaw(options.recurrenceRule)
1194
+ ? options.recurrenceRule !== null
1195
+ ? transformers_1.GuildScheduledEvents.guildScheduledEventRecurrenceRuleToRaw(options.recurrenceRule)
1196
+ : null
1163
1197
  : undefined,
1164
1198
  },
1165
1199
  reason,
@@ -1178,6 +1212,19 @@ class Client extends node_events_1.default {
1178
1212
  });
1179
1213
  return transformers_1.Stickers.stickerFromRaw(response);
1180
1214
  }
1215
+ /** https://discord.com/developers/docs/resources/soundboard#edit-guild-soundboard-sound */
1216
+ async editGuildSoundboardSound(guildID, soundID, options, reason) {
1217
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildID, soundID), {
1218
+ json: {
1219
+ name: options.name,
1220
+ volume: options.volume,
1221
+ emoji_id: options.emojiID,
1222
+ emoji_name: options.emojiName,
1223
+ },
1224
+ reason,
1225
+ });
1226
+ return transformers_1.Soundboards.soundboardSoundFromRaw(response);
1227
+ }
1181
1228
  /** https://discord.com/developers/docs/resources/guild-template#modify-guild-template */
1182
1229
  async editGuildTemplate(guildID, code, options) {
1183
1230
  const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildTemplate(guildID, code), {
@@ -1307,6 +1354,20 @@ class Client extends node_events_1.default {
1307
1354
  waveform: attachment.waveform,
1308
1355
  flags: attachment.flags,
1309
1356
  })),
1357
+ poll: options.poll !== undefined
1358
+ ? options.poll !== null
1359
+ ? {
1360
+ question: options.poll.question,
1361
+ answers: options.poll.answers.map((answer) => ({
1362
+ answer_id: answer.answerID,
1363
+ poll_media: answer.pollMedia,
1364
+ })),
1365
+ duration: options.poll.duration,
1366
+ allow_multiselect: options.poll.allowMultiselect,
1367
+ layout_type: options.poll.layoutType,
1368
+ }
1369
+ : null
1370
+ : undefined,
1310
1371
  },
1311
1372
  files: options.files,
1312
1373
  query: {
@@ -1354,6 +1415,20 @@ class Client extends node_events_1.default {
1354
1415
  waveform: attachment.waveform,
1355
1416
  flags: attachment.flags,
1356
1417
  })),
1418
+ poll: options.poll !== undefined
1419
+ ? options.poll !== null
1420
+ ? {
1421
+ question: options.poll.question,
1422
+ answers: options.poll.answers.map((answer) => ({
1423
+ answer_id: answer.answerID,
1424
+ poll_media: answer.pollMedia,
1425
+ })),
1426
+ duration: options.poll.duration,
1427
+ allow_multiselect: options.poll.allowMultiselect,
1428
+ layout_type: options.poll.layoutType,
1429
+ }
1430
+ : null
1431
+ : undefined,
1357
1432
  },
1358
1433
  files: options.files,
1359
1434
  query: {
@@ -1422,6 +1497,20 @@ class Client extends node_events_1.default {
1422
1497
  waveform: attachment.waveform,
1423
1498
  flags: attachment.flags,
1424
1499
  })),
1500
+ poll: options.poll !== undefined
1501
+ ? options.poll !== null
1502
+ ? {
1503
+ question: options.poll.question,
1504
+ answers: options.poll.answers.map((answer) => ({
1505
+ answer_id: answer.answerID,
1506
+ poll_media: answer.pollMedia,
1507
+ })),
1508
+ duration: options.poll.duration,
1509
+ allow_multiselect: options.poll.allowMultiselect,
1510
+ layout_type: options.poll.layoutType,
1511
+ }
1512
+ : null
1513
+ : undefined,
1425
1514
  },
1426
1515
  files: options.files,
1427
1516
  query: {
@@ -1565,6 +1654,22 @@ class Client extends node_events_1.default {
1565
1654
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAutoModerationRules(guildID));
1566
1655
  return response.map((autoModerationRule) => transformers_1.AutoModeration.autoModerationRuleFromRaw(autoModerationRule));
1567
1656
  }
1657
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-activity-instance */
1658
+ async getApplicationActivityInstance(applicationID, instanceID) {
1659
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationActivityInstance(applicationID, instanceID));
1660
+ return {
1661
+ applicationID: response.application_id,
1662
+ instanceID: response.instance_id,
1663
+ launchID: response.launch_id,
1664
+ location: {
1665
+ id: response.location.id,
1666
+ kind: response.location.kind,
1667
+ channelID: response.location.channel_id,
1668
+ guildID: response.location.guild_id,
1669
+ },
1670
+ users: response.users,
1671
+ };
1672
+ }
1568
1673
  /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
1569
1674
  async getApplicationCommandPermissions(applicationID, guildID, commandID) {
1570
1675
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommandPermissions(applicationID, guildID, commandID));
@@ -1647,7 +1752,17 @@ class Client extends node_events_1.default {
1647
1752
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildID));
1648
1753
  return transformers_1.Voice.voiceStateFromRaw(response);
1649
1754
  }
1650
- /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
1755
+ /** https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds */
1756
+ async getDefaultSoundboardSounds() {
1757
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.soundboardDefaultSounds());
1758
+ return response.map((sound) => transformers_1.Soundboards.soundboardSoundFromRaw(sound));
1759
+ }
1760
+ /** https://discord.com/developers/docs/resources/entitlement#get-entitlement */
1761
+ async getEntitlement(applicationID, entitlementID) {
1762
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlement(applicationID, entitlementID));
1763
+ return transformers_1.Entitlements.entitlementFromRaw(response);
1764
+ }
1765
+ /** https://discord.com/developers/docs/resources/entitlement#list-entitlements */
1651
1766
  async getEntitlements(applicationID, options) {
1652
1767
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlements(applicationID), {
1653
1768
  query: {
@@ -1658,6 +1773,7 @@ class Client extends node_events_1.default {
1658
1773
  limit: options?.limit,
1659
1774
  guild_id: options?.guildID,
1660
1775
  exclude_ended: options?.excludeEnded,
1776
+ exclude_deleted: options?.excludeDeleted,
1661
1777
  },
1662
1778
  });
1663
1779
  return response.map((entitlement) => transformers_1.Entitlements.entitlementFromRaw(entitlement));
@@ -1853,6 +1969,11 @@ class Client extends node_events_1.default {
1853
1969
  },
1854
1970
  });
1855
1971
  }
1972
+ /** https://discord.com/developers/docs/resources/guild#get-guild-role */
1973
+ async getGuildRole(guildID, roleID) {
1974
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRole(guildID, roleID));
1975
+ return transformers_1.Roles.roleFromRaw(response);
1976
+ }
1856
1977
  /** https://discord.com/developers/docs/resources/guild#get-guild-roles */
1857
1978
  async getGuildRoles(guildID) {
1858
1979
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRoles(guildID));
@@ -1895,6 +2016,17 @@ class Client extends node_events_1.default {
1895
2016
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildStickers(guildID));
1896
2017
  return response.map((sticker) => transformers_1.Stickers.stickerFromRaw(sticker));
1897
2018
  }
2019
+ /** https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound */
2020
+ async getGuildSoundboardSound(guildID, soundID) {
2021
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildID, soundID));
2022
+ return transformers_1.Soundboards.soundboardSoundFromRaw(response);
2023
+ }
2024
+ async getGuildSoundboardSounds(guildID) {
2025
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSounds(guildID));
2026
+ return {
2027
+ items: response.items.map((sound) => transformers_1.Soundboards.soundboardSoundFromRaw(sound)),
2028
+ };
2029
+ }
1898
2030
  /** https://discord.com/developers/docs/resources/guild-template#get-guild-template */
1899
2031
  async getGuildTemplate(guildID, code) {
1900
2032
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildTemplate(guildID, code));
@@ -2066,16 +2198,46 @@ class Client extends node_events_1.default {
2066
2198
  users: response.users.map((user) => transformers_1.Users.userFromRaw(user)),
2067
2199
  };
2068
2200
  }
2069
- /** https://discord.com/developers/docs/monetization/skus#list-skus */
2201
+ /** https://discord.com/developers/docs/resources/sku#list-skus */
2070
2202
  async getSKUs(applicationID) {
2071
2203
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationSKUs(applicationID));
2072
2204
  return response.map((sku) => transformers_1.SKUs.skuFromRaw(sku));
2073
2205
  }
2206
+ /** https://discord.com/developers/docs/resources/subscription#get-sku-subscription */
2207
+ async getSKUSubscription(skuID, subscriptionID) {
2208
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.skuSubscription(skuID, subscriptionID));
2209
+ return transformers_1.Subscriptions.subscriptionFromRaw(response);
2210
+ }
2211
+ /** https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions */
2212
+ async getSKUSubscriptions(skuID, options) {
2213
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.skuSubscriptions(skuID), {
2214
+ query: {
2215
+ before: options.before,
2216
+ after: options.after,
2217
+ limit: options.limit,
2218
+ user_id: options.userID,
2219
+ },
2220
+ });
2221
+ return response.map((subscription) => transformers_1.Subscriptions.subscriptionFromRaw(subscription));
2222
+ }
2074
2223
  /** https://discord.com/developers/docs/resources/stage-instance#get-stage-instance */
2075
2224
  async getStageInstance(channelID) {
2076
2225
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stageInstance(channelID));
2077
2226
  return transformers_1.StageInstances.stageInstanceFromRaw(response);
2078
2227
  }
2228
+ /** https://discord.com/developers/docs/resources/sticker#get-sticker-pack */
2229
+ async getStickerPack(packID) {
2230
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPack(packID));
2231
+ return {
2232
+ id: response.id,
2233
+ stickers: response.stickers.map((sticker) => transformers_1.Stickers.stickerFromRaw(sticker)),
2234
+ name: response.name,
2235
+ skuID: response.sku_id,
2236
+ coverStickerID: response.cover_sticker_id,
2237
+ description: response.description,
2238
+ bannerAssetID: response.banner_asset_id,
2239
+ };
2240
+ }
2079
2241
  /** https://discord.com/developers/docs/resources/sticker#list-sticker-packs */
2080
2242
  async getStickerPacks() {
2081
2243
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPacks());
@@ -2218,6 +2380,15 @@ class Client extends node_events_1.default {
2218
2380
  });
2219
2381
  return response.map((guildMember) => transformers_1.Guilds.guildMemberFromRaw(guildMember));
2220
2382
  }
2383
+ /** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
2384
+ sendSoundboardSound(channelID, options) {
2385
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.sendSoundboardSound(channelID), {
2386
+ json: {
2387
+ sound_id: options.soundID,
2388
+ source_guild_id: options.sourceGuildID,
2389
+ },
2390
+ });
2391
+ }
2221
2392
  /** https://discord.com/developers/docs/topics/gateway-events#update-presence */
2222
2393
  setPresence(options) {
2223
2394
  this.shards.forEach((shard) => shard.updatePresence(options));