disgroove 1.2.8-dev.cdf6a54 → 1.2.8-dev.dc83e5f

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 (70) hide show
  1. package/dist/Client.d.ts +11 -11
  2. package/dist/Client.js +18 -12
  3. package/dist/Client.js.map +1 -1
  4. package/dist/constants.d.ts +9 -4
  5. package/dist/constants.js +8 -3
  6. package/dist/constants.js.map +1 -1
  7. package/dist/gateway/Shard.js +40 -43
  8. package/dist/gateway/Shard.js.map +1 -1
  9. package/dist/rest/REST.d.ts +6 -27
  10. package/dist/rest/REST.js +10 -10
  11. package/dist/rest/REST.js.map +1 -1
  12. package/dist/rest/RequestsManager.d.ts +9 -6
  13. package/dist/rest/RequestsManager.js +9 -8
  14. package/dist/rest/RequestsManager.js.map +1 -1
  15. package/dist/structures/Application.d.ts +1 -1
  16. package/dist/structures/Application.js +34 -13
  17. package/dist/structures/Application.js.map +1 -1
  18. package/dist/structures/ApplicationCommand.js +3 -3
  19. package/dist/structures/ApplicationCommand.js.map +1 -1
  20. package/dist/structures/AutoModerationRule.js +2 -2
  21. package/dist/structures/AutoModerationRule.js.map +1 -1
  22. package/dist/structures/Channel.js +43 -31
  23. package/dist/structures/Channel.js.map +1 -1
  24. package/dist/structures/Emoji.js +2 -2
  25. package/dist/structures/Emoji.js.map +1 -1
  26. package/dist/structures/Guild.d.ts +6 -66
  27. package/dist/structures/Guild.js +95 -69
  28. package/dist/structures/Guild.js.map +1 -1
  29. package/dist/structures/GuildMember.d.ts +4 -10
  30. package/dist/structures/GuildMember.js +6 -6
  31. package/dist/structures/GuildMember.js.map +1 -1
  32. package/dist/structures/GuildScheduledEvent.js +7 -5
  33. package/dist/structures/GuildScheduledEvent.js.map +1 -1
  34. package/dist/structures/GuildTemplate.js +1 -1
  35. package/dist/structures/GuildTemplate.js.map +1 -1
  36. package/dist/structures/Integration.d.ts +6 -16
  37. package/dist/structures/Integration.js +1 -1
  38. package/dist/structures/Integration.js.map +1 -1
  39. package/dist/structures/Interaction.js +16 -10
  40. package/dist/structures/Interaction.js.map +1 -1
  41. package/dist/structures/Invite.js +1 -1
  42. package/dist/structures/Invite.js.map +1 -1
  43. package/dist/structures/Message.d.ts +6 -21
  44. package/dist/structures/Message.js +9 -7
  45. package/dist/structures/Message.js.map +1 -1
  46. package/dist/structures/PartialApplication.d.ts +1 -1
  47. package/dist/structures/PartialApplication.js +34 -13
  48. package/dist/structures/PartialApplication.js.map +1 -1
  49. package/dist/structures/Role.js +2 -2
  50. package/dist/structures/Role.js.map +1 -1
  51. package/dist/structures/StageInstance.js +2 -2
  52. package/dist/structures/StageInstance.js.map +1 -1
  53. package/dist/structures/Sticker.js +2 -2
  54. package/dist/structures/Sticker.js.map +1 -1
  55. package/dist/structures/UnavailableGuild.d.ts +496 -0
  56. package/dist/structures/UnavailableGuild.js +940 -0
  57. package/dist/structures/UnavailableGuild.js.map +1 -0
  58. package/dist/structures/User.js +4 -4
  59. package/dist/structures/User.js.map +1 -1
  60. package/dist/structures/Webhook.js +43 -26
  61. package/dist/structures/Webhook.js.map +1 -1
  62. package/dist/structures/index.d.ts +1 -0
  63. package/dist/structures/index.js +1 -0
  64. package/dist/structures/index.js.map +1 -1
  65. package/dist/types/auto-moderation.d.ts +0 -2
  66. package/dist/types/entitlements.d.ts +14 -6
  67. package/dist/types/gateway-events.d.ts +312 -9
  68. package/dist/types/guild.d.ts +8 -2
  69. package/dist/types/sku.d.ts +12 -0
  70. package/package.json +1 -1
@@ -188,13 +188,15 @@ class Guild extends _1.Base {
188
188
  async getApplicationCommands(applicationId, options) {
189
189
  return this.client.rest
190
190
  .get(rest_1.Endpoints.applicationGuildCommands(applicationId, this.id), {
191
- with_localizations: options?.withLocalizations,
191
+ query: {
192
+ with_localizations: options?.withLocalizations,
193
+ },
192
194
  })
193
195
  .then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
194
196
  }
195
197
  /** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
196
198
  async createApplicationCommand(applicationId, options) {
197
- return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationGuildCommands(applicationId, this.id), null, true, {
199
+ return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationGuildCommands(applicationId, this.id), {
198
200
  json: this.client.util.applicationCommandToRaw(options),
199
201
  }), this.client);
200
202
  }
@@ -204,7 +206,7 @@ class Guild extends _1.Base {
204
206
  }
205
207
  /** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
206
208
  async editApplicationCommand(applicationId, commandId, options) {
207
- return new _1.ApplicationCommand(await this.client.rest.patch(rest_1.Endpoints.applicationGuildCommand(applicationId, this.id, commandId), null, true, {
209
+ return new _1.ApplicationCommand(await this.client.rest.patch(rest_1.Endpoints.applicationGuildCommand(applicationId, this.id, commandId), {
208
210
  json: this.client.util.applicationCommandToRaw(options),
209
211
  }), this.client);
210
212
  }
@@ -215,7 +217,7 @@ class Guild extends _1.Base {
215
217
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
216
218
  async bulkOverwriteApplicationCommands(applicationId, commands) {
217
219
  return this.client.rest
218
- .put(rest_1.Endpoints.applicationGuildCommands(applicationId, this.id), null, true, {
220
+ .put(rest_1.Endpoints.applicationGuildCommands(applicationId, this.id), {
219
221
  json: commands.map((command) => this.client.util.applicationCommandToRaw(command)),
220
222
  })
221
223
  .then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
@@ -254,11 +256,13 @@ class Guild extends _1.Base {
254
256
  async getAuditLog(options) {
255
257
  return this.client.rest
256
258
  .get(rest_1.Endpoints.guildAuditLog(this.id), {
257
- user_id: options?.userId,
258
- action_type: options?.actionType,
259
- before: options?.before,
260
- after: options?.after,
261
- limit: options?.limit,
259
+ query: {
260
+ user_id: options?.userId,
261
+ action_type: options?.actionType,
262
+ before: options?.before,
263
+ after: options?.after,
264
+ limit: options?.limit,
265
+ },
262
266
  })
263
267
  .then((response) => ({
264
268
  applicationCommands: response.application_commands.map((applicationCommand) => new _1.ApplicationCommand(applicationCommand, this.client)),
@@ -309,7 +313,7 @@ class Guild extends _1.Base {
309
313
  }
310
314
  /** https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */
311
315
  async createAutoModerationRule(options, reason) {
312
- return new _1.AutoModerationRule(await this.client.rest.post(rest_1.Endpoints.guildAutoModerationRules(this.id), null, true, {
316
+ return new _1.AutoModerationRule(await this.client.rest.post(rest_1.Endpoints.guildAutoModerationRules(this.id), {
313
317
  json: {
314
318
  name: options.name,
315
319
  event_type: options.eventType,
@@ -332,7 +336,7 @@ class Guild extends _1.Base {
332
336
  }
333
337
  /** https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule */
334
338
  async editAutoModerationRule(ruleId, options, reason) {
335
- return new _1.AutoModerationRule(await this.client.rest.patch(rest_1.Endpoints.guildAutoModerationRule(this.id, ruleId), null, true, {
339
+ return new _1.AutoModerationRule(await this.client.rest.patch(rest_1.Endpoints.guildAutoModerationRule(this.id, ruleId), {
336
340
  json: {
337
341
  name: options.name,
338
342
  event_type: options.eventType,
@@ -355,7 +359,7 @@ class Guild extends _1.Base {
355
359
  }
356
360
  /** https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule */
357
361
  deleteAutoModerationRule(ruleId, reason) {
358
- this.client.rest.delete(rest_1.Endpoints.guildAutoModerationRule(this.id, ruleId), null, true, {
362
+ this.client.rest.delete(rest_1.Endpoints.guildAutoModerationRule(this.id, ruleId), {
359
363
  reason,
360
364
  });
361
365
  }
@@ -371,7 +375,7 @@ class Guild extends _1.Base {
371
375
  }
372
376
  /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
373
377
  async createEmoji(options, reason) {
374
- return new _1.Emoji(await this.client.rest.post(rest_1.Endpoints.guildEmojis(this.id), null, true, {
378
+ return new _1.Emoji(await this.client.rest.post(rest_1.Endpoints.guildEmojis(this.id), {
375
379
  json: {
376
380
  name: options.name,
377
381
  image: options.image,
@@ -382,7 +386,7 @@ class Guild extends _1.Base {
382
386
  }
383
387
  /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji */
384
388
  async editEmoji(emojiId, options, reason) {
385
- return new _1.Emoji(await this.client.rest.patch(rest_1.Endpoints.guildEmoji(this.id, emojiId), null, true, {
389
+ return new _1.Emoji(await this.client.rest.patch(rest_1.Endpoints.guildEmoji(this.id, emojiId), {
386
390
  json: {
387
391
  name: options.name,
388
392
  roles: options.roles,
@@ -392,7 +396,7 @@ class Guild extends _1.Base {
392
396
  }
393
397
  /** https://discord.com/developers/docs/resources/emoji#delete-guild-emoji */
394
398
  deleteEmoji(emojiId, reason) {
395
- this.client.rest.delete(rest_1.Endpoints.guildEmoji(this.id, emojiId), null, true, {
399
+ this.client.rest.delete(rest_1.Endpoints.guildEmoji(this.id, emojiId), {
396
400
  reason,
397
401
  });
398
402
  }
@@ -431,7 +435,7 @@ class Guild extends _1.Base {
431
435
  }
432
436
  /** https://discord.com/developers/docs/resources/guild#modify-guild */
433
437
  async edit(options, reason) {
434
- return new Guild(await this.client.rest.patch(rest_1.Endpoints.guild(this.id), null, true, {
438
+ return new Guild(await this.client.rest.patch(rest_1.Endpoints.guild(this.id), {
435
439
  json: {
436
440
  name: options.name,
437
441
  region: options.region,
@@ -470,7 +474,7 @@ class Guild extends _1.Base {
470
474
  }
471
475
  /** https://discord.com/developers/docs/resources/guild#create-guild-channel */
472
476
  async createChannel(options, reason) {
473
- return new _1.Channel(await this.client.rest.post(rest_1.Endpoints.guildChannels(this.id), null, true, {
477
+ return new _1.Channel(await this.client.rest.post(rest_1.Endpoints.guildChannels(this.id), {
474
478
  json: {
475
479
  name: options.name,
476
480
  type: options.type,
@@ -499,7 +503,7 @@ class Guild extends _1.Base {
499
503
  }
500
504
  /** https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions */
501
505
  editChannelPositions(options) {
502
- this.client.rest.patch(rest_1.Endpoints.guildChannels(this.id), null, true, {
506
+ this.client.rest.patch(rest_1.Endpoints.guildChannels(this.id), {
503
507
  json: options.map((data) => ({
504
508
  id: data.id,
505
509
  position: data.position,
@@ -539,15 +543,17 @@ class Guild extends _1.Base {
539
543
  async searchMembers(options) {
540
544
  return this.client.rest
541
545
  .get(rest_1.Endpoints.guildMembersSearch(this.id), {
542
- query: options.query,
543
- limit: options.limit,
546
+ query: {
547
+ query: options.query,
548
+ limit: options.limit,
549
+ },
544
550
  })
545
551
  .then((response) => response.map((data) => new _1.GuildMember(data, this.client)));
546
552
  }
547
553
  /** https://discord.com/developers/docs/resources/guild#add-guild-member */
548
554
  async addMember(userId, options) {
549
555
  return this.client.rest
550
- .put(rest_1.Endpoints.guildMember(this.id, userId), null, true, {
556
+ .put(rest_1.Endpoints.guildMember(this.id, userId), {
551
557
  json: {
552
558
  access_token: options.accessToken,
553
559
  nick: options.nick,
@@ -567,7 +573,7 @@ class Guild extends _1.Base {
567
573
  }
568
574
  /** https://discord.com/developers/docs/resources/guild#modify-guild-member */
569
575
  async editMember(userId, options, reason) {
570
- return new _1.GuildMember(await this.client.rest.patch(rest_1.Endpoints.guildMember(this.id, userId), null, true, {
576
+ return new _1.GuildMember(await this.client.rest.patch(rest_1.Endpoints.guildMember(this.id, userId), {
571
577
  json: {
572
578
  nick: options.nick,
573
579
  roles: options.roles,
@@ -582,7 +588,7 @@ class Guild extends _1.Base {
582
588
  }
583
589
  /** https://discord.com/developers/docs/resources/guild#modify-current-member */
584
590
  async editCurrentMember(options, reason) {
585
- return new _1.GuildMember(await this.client.rest.patch(rest_1.Endpoints.guildMember(this.id), null, true, {
591
+ return new _1.GuildMember(await this.client.rest.patch(rest_1.Endpoints.guildMember(this.id), {
586
592
  json: {
587
593
  nick: options.nick,
588
594
  },
@@ -591,19 +597,19 @@ class Guild extends _1.Base {
591
597
  }
592
598
  /** https://discord.com/developers/docs/resources/guild#add-guild-member-role */
593
599
  addMemberRole(userId, roleId, reason) {
594
- this.client.rest.put(rest_1.Endpoints.guildMemberRole(this.id, userId, roleId), null, true, {
600
+ this.client.rest.put(rest_1.Endpoints.guildMemberRole(this.id, userId, roleId), {
595
601
  reason,
596
602
  });
597
603
  }
598
604
  /** https://discord.com/developers/docs/resources/guild#remove-guild-member-role */
599
605
  removeMemberRole(userId, roleId, reason) {
600
- this.client.rest.delete(rest_1.Endpoints.guildMemberRole(this.id, userId, roleId), null, true, {
606
+ this.client.rest.delete(rest_1.Endpoints.guildMemberRole(this.id, userId, roleId), {
601
607
  reason,
602
608
  });
603
609
  }
604
610
  /** https://discord.com/developers/docs/resources/guild#remove-guild-member-role */
605
611
  removeMember(userId, reason) {
606
- this.client.rest.delete(rest_1.Endpoints.guildMember(this.id, userId), null, true, {
612
+ this.client.rest.delete(rest_1.Endpoints.guildMember(this.id, userId), {
607
613
  reason,
608
614
  });
609
615
  }
@@ -611,9 +617,11 @@ class Guild extends _1.Base {
611
617
  async getBans(options) {
612
618
  return this.client.rest
613
619
  .get(rest_1.Endpoints.guildBans(this.id), {
614
- limit: options?.limit,
615
- before: options?.before,
616
- after: options?.after,
620
+ query: {
621
+ limit: options?.limit,
622
+ before: options?.before,
623
+ after: options?.after,
624
+ },
617
625
  })
618
626
  .then((response) => response.map((data) => ({
619
627
  reason: data.reason,
@@ -631,7 +639,7 @@ class Guild extends _1.Base {
631
639
  }
632
640
  /** https://discord.com/developers/docs/resources/guild#create-guild-ban */
633
641
  createBan(userId, options, reason) {
634
- this.client.rest.put(rest_1.Endpoints.guildBan(this.id, userId), null, true, {
642
+ this.client.rest.put(rest_1.Endpoints.guildBan(this.id, userId), {
635
643
  json: {
636
644
  delete_message_days: options?.deleteMessageDays,
637
645
  delete_message_seconds: options?.deleteMessageSeconds,
@@ -641,7 +649,7 @@ class Guild extends _1.Base {
641
649
  }
642
650
  /** https://discord.com/developers/docs/resources/guild#remove-guild-ban */
643
651
  removeBan(userId, reason) {
644
- this.client.rest.delete(rest_1.Endpoints.guildBan(this.id, userId), null, true, {
652
+ this.client.rest.delete(rest_1.Endpoints.guildBan(this.id, userId), {
645
653
  reason,
646
654
  });
647
655
  }
@@ -653,7 +661,7 @@ class Guild extends _1.Base {
653
661
  }
654
662
  /** https://discord.com/developers/docs/resources/guild#create-guild-role */
655
663
  async createRole(options, reason) {
656
- return new _1.Role(await this.client.rest.post(rest_1.Endpoints.guildRoles(this.id), null, true, {
664
+ return new _1.Role(await this.client.rest.post(rest_1.Endpoints.guildRoles(this.id), {
657
665
  json: {
658
666
  name: options.name,
659
667
  permissions: options.permissions,
@@ -669,7 +677,7 @@ class Guild extends _1.Base {
669
677
  /** https://discord.com/developers/docs/resources/guild#modify-guild-role-positions */
670
678
  async editRolePositions(options) {
671
679
  return this.client.rest
672
- .patch(rest_1.Endpoints.guildRoles(this.id), null, true, {
680
+ .patch(rest_1.Endpoints.guildRoles(this.id), {
673
681
  json: options.map((data) => ({
674
682
  id: data.id,
675
683
  position: data.position,
@@ -679,7 +687,7 @@ class Guild extends _1.Base {
679
687
  }
680
688
  /** https://discord.com/developers/docs/resources/guild#modify-guild-role */
681
689
  async editRole(roleId, options, reason) {
682
- return new _1.Role(await this.client.rest.patch(rest_1.Endpoints.guildRole(this.id, roleId), null, true, {
690
+ return new _1.Role(await this.client.rest.patch(rest_1.Endpoints.guildRole(this.id, roleId), {
683
691
  json: {
684
692
  name: options?.name,
685
693
  permissions: options?.permissions,
@@ -694,7 +702,7 @@ class Guild extends _1.Base {
694
702
  }
695
703
  /** https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level */
696
704
  async editMFALevel(options, reason) {
697
- return this.client.rest.post(rest_1.Endpoints.guildMFA(this.id), null, true, {
705
+ return this.client.rest.post(rest_1.Endpoints.guildMFA(this.id), {
698
706
  json: {
699
707
  level: options.level,
700
708
  },
@@ -703,20 +711,22 @@ class Guild extends _1.Base {
703
711
  }
704
712
  /** https://discord.com/developers/docs/resources/guild#delete-guild-role */
705
713
  deleteRole(roleId, reason) {
706
- this.client.rest.delete(rest_1.Endpoints.guildRole(this.id, roleId), null, true, {
714
+ this.client.rest.delete(rest_1.Endpoints.guildRole(this.id, roleId), {
707
715
  reason,
708
716
  });
709
717
  }
710
718
  /** https://discord.com/developers/docs/resources/guild#get-guild-prune-count */
711
719
  async getPruneCount(options) {
712
720
  return this.client.rest.get(rest_1.Endpoints.guildPrune(this.id), {
713
- days: options.days,
714
- include_roles: options.includeRoles,
721
+ query: {
722
+ days: options.days,
723
+ include_roles: options.includeRoles,
724
+ },
715
725
  });
716
726
  }
717
727
  /** https://discord.com/developers/docs/resources/guild#begin-guild-prune */
718
728
  async beginGuildPrune(options, reason) {
719
- return this.client.rest.post(rest_1.Endpoints.guildPrune(this.id), null, true, {
729
+ return this.client.rest.post(rest_1.Endpoints.guildPrune(this.id), {
720
730
  json: {
721
731
  days: options.days,
722
732
  compute_prune_count: options.computePruneCount,
@@ -752,7 +762,7 @@ class Guild extends _1.Base {
752
762
  }
753
763
  /** https://discord.com/developers/docs/resources/guild#delete-guild-integration */
754
764
  deleteIntegration(integrationId, reason) {
755
- this.client.rest.delete(rest_1.Endpoints.guildIntegration(this.id, integrationId), null, true, {
765
+ this.client.rest.delete(rest_1.Endpoints.guildIntegration(this.id, integrationId), {
756
766
  reason,
757
767
  });
758
768
  }
@@ -768,7 +778,7 @@ class Guild extends _1.Base {
768
778
  /** https://discord.com/developers/docs/resources/guild#modify-guild-widget */
769
779
  async editWidget(options, reason) {
770
780
  return this.client.rest
771
- .patch(rest_1.Endpoints.guildWidgetSettings(this.id), null, true, {
781
+ .patch(rest_1.Endpoints.guildWidgetSettings(this.id), {
772
782
  json: {
773
783
  enabled: options.enabled,
774
784
  channel_id: options.channelId,
@@ -800,7 +810,9 @@ class Guild extends _1.Base {
800
810
  /** https://discord.com/developers/docs/resources/guild#get-guild-widget-image */
801
811
  async getWidgetImage(options) {
802
812
  return this.client.rest.get(rest_1.Endpoints.guildWidgetImage(this.id), {
803
- style: options?.style,
813
+ query: {
814
+ style: options?.style,
815
+ },
804
816
  });
805
817
  }
806
818
  /** https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen */
@@ -820,7 +832,7 @@ class Guild extends _1.Base {
820
832
  /** https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen */
821
833
  async editWelcomeScreen(options, reason) {
822
834
  return this.client.rest
823
- .patch(rest_1.Endpoints.guildWelcomeScreen(this.id), null, true, {
835
+ .patch(rest_1.Endpoints.guildWelcomeScreen(this.id), {
824
836
  json: {
825
837
  enabled: options.enabled,
826
838
  welcome_channels: options.welcomeChannels,
@@ -851,7 +863,12 @@ class Guild extends _1.Base {
851
863
  id: option.id,
852
864
  channelIds: option.channel_ids,
853
865
  roleIds: option.role_ids,
854
- emoji: new _1.Emoji(option.emoji, this.client),
866
+ emoji: option.emoji !== undefined
867
+ ? new _1.Emoji(option.emoji, this.client)
868
+ : undefined,
869
+ emojiId: option.emoji_id,
870
+ emojiName: option.emoji_name,
871
+ emojiAnimated: option.emoji_animated,
855
872
  title: option.title,
856
873
  description: option.description,
857
874
  })),
@@ -867,7 +884,7 @@ class Guild extends _1.Base {
867
884
  }
868
885
  /** https://discord.com/developers/docs/resources/guild#modify-guild-onboarding */
869
886
  editOnboarding(options, reason) {
870
- this.client.rest.patch(rest_1.Endpoints.guildOnboarding(this.id), null, true, {
887
+ this.client.rest.patch(rest_1.Endpoints.guildOnboarding(this.id), {
871
888
  json: {
872
889
  prompts: options.prompts.map((prompt) => ({
873
890
  id: prompt.id,
@@ -876,16 +893,21 @@ class Guild extends _1.Base {
876
893
  id: option.id,
877
894
  channel_ids: option.channelIds,
878
895
  role_ids: option.roleIds,
879
- emoji: {
880
- id: option.emoji.id,
881
- name: option.emoji.name,
882
- roles: option.emoji.roles,
883
- user: option.emoji.user,
884
- require_colons: option.emoji.requireColons,
885
- managed: option.emoji.managed,
886
- animated: option.emoji.animated,
887
- available: option.emoji.available,
888
- },
896
+ emoji: option.emoji !== undefined
897
+ ? {
898
+ id: option.emoji.id,
899
+ name: option.emoji.name,
900
+ roles: option.emoji.roles,
901
+ user: option.emoji.user,
902
+ require_colons: option.emoji.requireColons,
903
+ managed: option.emoji.managed,
904
+ animated: option.emoji.animated,
905
+ available: option.emoji.available,
906
+ }
907
+ : undefined,
908
+ emoji_id: option.emojiId,
909
+ emoji_name: option.emojiName,
910
+ emoji_animated: option.emojiAnimated,
889
911
  title: option.title,
890
912
  description: option.description,
891
913
  })),
@@ -900,7 +922,7 @@ class Guild extends _1.Base {
900
922
  }
901
923
  /** https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state */
902
924
  editCurrentUserVoiceState(options) {
903
- this.client.rest.patch(rest_1.Endpoints.guildVoiceState(this.id), null, true, {
925
+ this.client.rest.patch(rest_1.Endpoints.guildVoiceState(this.id), {
904
926
  json: {
905
927
  channel_id: options.channelId,
906
928
  suppress: options.suppress,
@@ -910,7 +932,7 @@ class Guild extends _1.Base {
910
932
  }
911
933
  /** https://discord.com/developers/docs/resources/guild#modify-user-voice-state */
912
934
  editUserVoiceState(userId, options) {
913
- this.client.rest.patch(rest_1.Endpoints.guildVoiceState(this.id, userId), null, true, {
935
+ this.client.rest.patch(rest_1.Endpoints.guildVoiceState(this.id, userId), {
914
936
  json: {
915
937
  channel_id: options.channelId,
916
938
  suppress: options.suppress,
@@ -922,13 +944,15 @@ class Guild extends _1.Base {
922
944
  async getScheduledEvents(options) {
923
945
  return this.client.rest
924
946
  .get(rest_1.Endpoints.guildScheduledEvents(this.id), {
925
- with_user_count: options?.withUserCount,
947
+ query: {
948
+ with_user_count: options?.withUserCount,
949
+ },
926
950
  })
927
951
  .then((response) => response.map((data) => new _1.GuildScheduledEvent(data, this.client)));
928
952
  }
929
953
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event */
930
954
  async createScheduledEvent(options, reason) {
931
- return new _1.GuildScheduledEvent(await this.client.rest.post(rest_1.Endpoints.guildScheduledEvents(this.id), null, true, {
955
+ return new _1.GuildScheduledEvent(await this.client.rest.post(rest_1.Endpoints.guildScheduledEvents(this.id), {
932
956
  json: {
933
957
  channel_id: options.channelId,
934
958
  entity_metadata: options.entityMetadata,
@@ -945,7 +969,7 @@ class Guild extends _1.Base {
945
969
  }
946
970
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event */
947
971
  async editScheduledEvent(scheduledEventId, options, reason) {
948
- return new _1.GuildScheduledEvent(await this.client.rest.patch(rest_1.Endpoints.guildScheduledEvent(this.id, scheduledEventId), null, true, {
972
+ return new _1.GuildScheduledEvent(await this.client.rest.patch(rest_1.Endpoints.guildScheduledEvent(this.id, scheduledEventId), {
949
973
  json: {
950
974
  channel_id: options.channelId,
951
975
  entity_metadata: options.entityMetadata,
@@ -969,10 +993,12 @@ class Guild extends _1.Base {
969
993
  async getScheduledEventUsers(scheduledEventId, options) {
970
994
  return this.client.rest
971
995
  .get(rest_1.Endpoints.guildScheduledEvent(this.id, scheduledEventId), {
972
- limit: options?.limit,
973
- with_member: options?.withMember,
974
- before: options?.before,
975
- after: options?.after,
996
+ query: {
997
+ limit: options?.limit,
998
+ with_member: options?.withMember,
999
+ before: options?.before,
1000
+ after: options?.after,
1001
+ },
976
1002
  })
977
1003
  .then((response) => response.map((data) => ({
978
1004
  guildScheduledEventId: data.guild_scheduled_event_id,
@@ -994,7 +1020,7 @@ class Guild extends _1.Base {
994
1020
  }
995
1021
  /** https://discord.com/developers/docs/resources/guild-template#create-guild-template */
996
1022
  async createTemplate(options) {
997
- return new _1.GuildTemplate(await this.client.rest.post(rest_1.Endpoints.guildTemplates(this.id), null, true, {
1023
+ return new _1.GuildTemplate(await this.client.rest.post(rest_1.Endpoints.guildTemplates(this.id), {
998
1024
  json: {
999
1025
  name: options.name,
1000
1026
  description: options.description,
@@ -1007,7 +1033,7 @@ class Guild extends _1.Base {
1007
1033
  }
1008
1034
  /** https://discord.com/developers/docs/resources/guild-template#modify-guild-template */
1009
1035
  async editTemplate(code, options) {
1010
- return new _1.GuildTemplate(await this.client.rest.patch(rest_1.Endpoints.guildTemplate(this.id, code), null, true, {
1036
+ return new _1.GuildTemplate(await this.client.rest.patch(rest_1.Endpoints.guildTemplate(this.id, code), {
1011
1037
  json: {
1012
1038
  name: options.name,
1013
1039
  description: options.description,
@@ -1040,7 +1066,7 @@ class Guild extends _1.Base {
1040
1066
  formData.set("tags", options.tags);
1041
1067
  formData.set("file", new undici_1.File([options.file.contents], options.file.name));
1042
1068
  return this.client.rest
1043
- .post(rest_1.Endpoints.guildStickers(this.id), null, true, {
1069
+ .post(rest_1.Endpoints.guildStickers(this.id), {
1044
1070
  form: formData,
1045
1071
  reason,
1046
1072
  })
@@ -1049,7 +1075,7 @@ class Guild extends _1.Base {
1049
1075
  /** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
1050
1076
  async editSticker(stickerId, options, reason) {
1051
1077
  return this.client.rest
1052
- .patch(rest_1.Endpoints.guildSticker(this.id, stickerId), null, true, {
1078
+ .patch(rest_1.Endpoints.guildSticker(this.id, stickerId), {
1053
1079
  json: {
1054
1080
  name: options.name,
1055
1081
  description: options.description,
@@ -1061,7 +1087,7 @@ class Guild extends _1.Base {
1061
1087
  }
1062
1088
  /** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
1063
1089
  deleteSticker(stickerId, reason) {
1064
- this.client.rest.delete(rest_1.Endpoints.guildSticker(this.id, stickerId), null, true, {
1090
+ this.client.rest.delete(rest_1.Endpoints.guildSticker(this.id, stickerId), {
1065
1091
  reason,
1066
1092
  });
1067
1093
  }