@discordjs/core 0.2.0 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ # [@discordjs/core@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.2.0...@discordjs/core@0.3.0) - (2022-12-16)
6
+
7
+ ## Bug Fixes
8
+
9
+ - **core:** Instantiate/export role connections ([166f742](https://github.com/discordjs/discord.js/commit/166f742d02d475a5044f935ee638ae1e25075b9c))
10
+
5
11
  # [@discordjs/core@0.2.0](https://github.com/discordjs/discord.js/tree/@discordjs/core@0.2.0) - (2022-12-16)
6
12
 
7
13
  ## Bug Fixes
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { REST, RawFile } from '@discordjs/rest';
2
2
  import * as discord_api_types_v10 from 'discord-api-types/v10';
3
- import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPITemplateCreateGuildJSONBody, RESTPostAPIChannelWebhookJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetNitroStickerPacksResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIGuildForumThreadsJSONBody, APIThreadChannel, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, GatewayDispatchEvents, GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayTypingStartDispatchData, GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData } from 'discord-api-types/v10';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPITemplateCreateGuildJSONBody, RESTPostAPIChannelWebhookJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetNitroStickerPacksResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIGuildForumThreadsJSONBody, APIThreadChannel, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, GatewayDispatchEvents, GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayTypingStartDispatchData, GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData } from 'discord-api-types/v10';
4
4
  export * from 'discord-api-types/v10';
5
5
  import { WebSocketManager } from '@discordjs/ws';
6
6
  import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
@@ -1169,6 +1169,26 @@ declare class InvitesAPI {
1169
1169
  delete(code: string, reason?: string): Promise<void>;
1170
1170
  }
1171
1171
 
1172
+ declare class RoleConnectionsAPI {
1173
+ private readonly rest;
1174
+ constructor(rest: REST);
1175
+ /**
1176
+ * Gets the role connection metadata records for the application
1177
+ *
1178
+ * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records}
1179
+ * @param applicationId - The id of the application to get role connection metadata records for
1180
+ */
1181
+ getMetadataRecords(applicationId: Snowflake): Promise<RESTGetAPIApplicationRoleConnectionMetadataResult>;
1182
+ /**
1183
+ * Updates the role connection metadata records for the application
1184
+ *
1185
+ * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records}
1186
+ * @param applicationId - The id of the application to update role connection metadata records for
1187
+ * @param options - The new role connection metadata records
1188
+ */
1189
+ updateMetadataRecords(applicationId: Snowflake, options: RESTPutAPIApplicationCommandPermissionsJSONBody): Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;
1190
+ }
1191
+
1172
1192
  declare class StickersAPI {
1173
1193
  private readonly rest;
1174
1194
  constructor(rest: REST);
@@ -1378,6 +1398,7 @@ declare class API {
1378
1398
  readonly guilds: GuildsAPI;
1379
1399
  readonly interactions: InteractionsAPI;
1380
1400
  readonly invites: InvitesAPI;
1401
+ readonly roleConnections: RoleConnectionsAPI;
1381
1402
  readonly stickers: StickersAPI;
1382
1403
  readonly threads: ThreadsAPI;
1383
1404
  readonly users: UsersAPI;
@@ -1506,4 +1527,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
1506
1527
  }[];
1507
1528
  };
1508
1529
 
1509
- export { API, ApplicationCommandsAPI, ChannelsAPI, ClientOptions, DescriptiveRawFile, GuildsAPI, InteractionsAPI, IntrinsicProps, InvitesAPI, ManagerShardEventsMap, MappedEvents, StartForumThreadOptions, StartThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, WithIntrinsicProps, createClient, withFiles };
1530
+ export { API, ApplicationCommandsAPI, ChannelsAPI, ClientOptions, DescriptiveRawFile, GuildsAPI, InteractionsAPI, IntrinsicProps, InvitesAPI, ManagerShardEventsMap, MappedEvents, RoleConnectionsAPI, StartForumThreadOptions, StartThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, WithIntrinsicProps, createClient, withFiles };
package/dist/index.js CHANGED
@@ -28,6 +28,7 @@ __export(src_exports, {
28
28
  GuildsAPI: () => GuildsAPI,
29
29
  InteractionsAPI: () => InteractionsAPI,
30
30
  InvitesAPI: () => InvitesAPI,
31
+ RoleConnectionsAPI: () => RoleConnectionsAPI,
31
32
  StickersAPI: () => StickersAPI,
32
33
  ThreadsAPI: () => ThreadsAPI,
33
34
  UsersAPI: () => UsersAPI,
@@ -598,32 +599,51 @@ var InvitesAPI = class {
598
599
  };
599
600
  __name(InvitesAPI, "InvitesAPI");
600
601
 
601
- // src/api/sticker.ts
602
+ // src/api/roleConnections.ts
602
603
  var import_v106 = require("discord-api-types/v10");
604
+ var RoleConnectionsAPI = class {
605
+ constructor(rest) {
606
+ this.rest = rest;
607
+ }
608
+ async getMetadataRecords(applicationId) {
609
+ return this.rest.get(
610
+ import_v106.Routes.applicationRoleConnectionMetadata(applicationId)
611
+ );
612
+ }
613
+ async updateMetadataRecords(applicationId, options) {
614
+ return this.rest.put(import_v106.Routes.applicationRoleConnectionMetadata(applicationId), {
615
+ body: options
616
+ });
617
+ }
618
+ };
619
+ __name(RoleConnectionsAPI, "RoleConnectionsAPI");
620
+
621
+ // src/api/sticker.ts
622
+ var import_v107 = require("discord-api-types/v10");
603
623
  var StickersAPI = class {
604
624
  constructor(rest) {
605
625
  this.rest = rest;
606
626
  }
607
627
  async getNitroStickers() {
608
- return this.rest.get(import_v106.Routes.nitroStickerPacks());
628
+ return this.rest.get(import_v107.Routes.nitroStickerPacks());
609
629
  }
610
630
  async get(stickerId) {
611
- return this.rest.get(import_v106.Routes.sticker(stickerId));
631
+ return this.rest.get(import_v107.Routes.sticker(stickerId));
612
632
  }
613
633
  };
614
634
  __name(StickersAPI, "StickersAPI");
615
635
 
616
636
  // src/api/thread.ts
617
- var import_v107 = require("discord-api-types/v10");
637
+ var import_v108 = require("discord-api-types/v10");
618
638
  var ThreadsAPI = class {
619
639
  constructor(rest) {
620
640
  this.rest = rest;
621
641
  }
622
642
  async get(threadId) {
623
- return this.rest.get(import_v107.Routes.channel(threadId));
643
+ return this.rest.get(import_v108.Routes.channel(threadId));
624
644
  }
625
645
  async create(channelId, { message_id, ...body }) {
626
- return this.rest.post(import_v107.Routes.threads(channelId, message_id), { body });
646
+ return this.rest.post(import_v108.Routes.threads(channelId, message_id), { body });
627
647
  }
628
648
  async createForumThread(channelId, { message, ...optionsBody }) {
629
649
  const { files, ...messageBody } = message;
@@ -631,82 +651,82 @@ var ThreadsAPI = class {
631
651
  ...optionsBody,
632
652
  message: messageBody
633
653
  };
634
- return this.rest.post(import_v107.Routes.threads(channelId), { files, body });
654
+ return this.rest.post(import_v108.Routes.threads(channelId), { files, body });
635
655
  }
636
656
  async join(threadId) {
637
- await this.rest.put(import_v107.Routes.threadMembers(threadId, "@me"));
657
+ await this.rest.put(import_v108.Routes.threadMembers(threadId, "@me"));
638
658
  }
639
659
  async addMember(threadId, userId) {
640
- await this.rest.put(import_v107.Routes.threadMembers(threadId, userId));
660
+ await this.rest.put(import_v108.Routes.threadMembers(threadId, userId));
641
661
  }
642
662
  async leave(threadId) {
643
- await this.rest.delete(import_v107.Routes.threadMembers(threadId, "@me"));
663
+ await this.rest.delete(import_v108.Routes.threadMembers(threadId, "@me"));
644
664
  }
645
665
  async removeMember(threadId, userId) {
646
- await this.rest.delete(import_v107.Routes.threadMembers(threadId, userId));
666
+ await this.rest.delete(import_v108.Routes.threadMembers(threadId, userId));
647
667
  }
648
668
  async getMember(threadId, userId) {
649
- return this.rest.get(import_v107.Routes.threadMembers(threadId, userId));
669
+ return this.rest.get(import_v108.Routes.threadMembers(threadId, userId));
650
670
  }
651
671
  async getAllMembers(threadId) {
652
- return this.rest.get(import_v107.Routes.threadMembers(threadId));
672
+ return this.rest.get(import_v108.Routes.threadMembers(threadId));
653
673
  }
654
674
  };
655
675
  __name(ThreadsAPI, "ThreadsAPI");
656
676
 
657
677
  // src/api/user.ts
658
678
  var import_rest5 = require("@discordjs/rest");
659
- var import_v108 = require("discord-api-types/v10");
679
+ var import_v109 = require("discord-api-types/v10");
660
680
  var UsersAPI = class {
661
681
  constructor(rest) {
662
682
  this.rest = rest;
663
683
  }
664
684
  async get(userId) {
665
- return this.rest.get(import_v108.Routes.user(userId));
685
+ return this.rest.get(import_v109.Routes.user(userId));
666
686
  }
667
687
  async getCurrent() {
668
- return this.rest.get(import_v108.Routes.user("@me"));
688
+ return this.rest.get(import_v109.Routes.user("@me"));
669
689
  }
670
690
  async getGuilds(options = {}) {
671
- return this.rest.get(import_v108.Routes.userGuilds(), {
691
+ return this.rest.get(import_v109.Routes.userGuilds(), {
672
692
  query: (0, import_rest5.makeURLSearchParams)(options)
673
693
  });
674
694
  }
675
695
  async leaveGuild(guildId) {
676
- await this.rest.delete(import_v108.Routes.userGuild(guildId));
696
+ await this.rest.delete(import_v109.Routes.userGuild(guildId));
677
697
  }
678
698
  async edit(user) {
679
- return this.rest.patch(import_v108.Routes.user("@me"), { body: user });
699
+ return this.rest.patch(import_v109.Routes.user("@me"), { body: user });
680
700
  }
681
701
  async getGuildMember(guildId) {
682
- return this.rest.get(import_v108.Routes.userGuildMember(guildId));
702
+ return this.rest.get(import_v109.Routes.userGuildMember(guildId));
683
703
  }
684
704
  async editGuildMember(guildId, member = {}, reason) {
685
- return this.rest.patch(import_v108.Routes.guildMember(guildId, "@me"), {
705
+ return this.rest.patch(import_v109.Routes.guildMember(guildId, "@me"), {
686
706
  reason,
687
707
  body: member
688
708
  });
689
709
  }
690
710
  async setVoiceState(guildId, options = {}) {
691
- return this.rest.patch(import_v108.Routes.guildVoiceState(guildId, "@me"), {
711
+ return this.rest.patch(import_v109.Routes.guildVoiceState(guildId, "@me"), {
692
712
  body: options
693
713
  });
694
714
  }
695
715
  async createDM(userId) {
696
- return this.rest.post(import_v108.Routes.userChannels(), {
716
+ return this.rest.post(import_v109.Routes.userChannels(), {
697
717
  body: { recipient_id: userId }
698
718
  });
699
719
  }
700
720
  async getConnections() {
701
- return this.rest.get(import_v108.Routes.userConnections());
721
+ return this.rest.get(import_v109.Routes.userConnections());
702
722
  }
703
723
  async getApplicationRoleConnection(applicationId) {
704
724
  return this.rest.get(
705
- import_v108.Routes.userApplicationRoleConnection(applicationId)
725
+ import_v109.Routes.userApplicationRoleConnection(applicationId)
706
726
  );
707
727
  }
708
728
  async updateApplicationRoleConnection(applicationId, options) {
709
- return this.rest.put(import_v108.Routes.userApplicationRoleConnection(applicationId), {
729
+ return this.rest.put(import_v109.Routes.userApplicationRoleConnection(applicationId), {
710
730
  body: options
711
731
  });
712
732
  }
@@ -714,38 +734,38 @@ var UsersAPI = class {
714
734
  __name(UsersAPI, "UsersAPI");
715
735
 
716
736
  // src/api/voice.ts
717
- var import_v109 = require("discord-api-types/v10");
737
+ var import_v1010 = require("discord-api-types/v10");
718
738
  var VoiceAPI = class {
719
739
  constructor(rest) {
720
740
  this.rest = rest;
721
741
  }
722
742
  async getVoiceRegions() {
723
- return this.rest.get(import_v109.Routes.voiceRegions());
743
+ return this.rest.get(import_v1010.Routes.voiceRegions());
724
744
  }
725
745
  };
726
746
  __name(VoiceAPI, "VoiceAPI");
727
747
 
728
748
  // src/api/webhook.ts
729
749
  var import_rest6 = require("@discordjs/rest");
730
- var import_v1010 = require("discord-api-types/v10");
750
+ var import_v1011 = require("discord-api-types/v10");
731
751
  var WebhooksAPI = class {
732
752
  constructor(rest) {
733
753
  this.rest = rest;
734
754
  }
735
755
  async get(id, token) {
736
- return this.rest.get(import_v1010.Routes.webhook(id, token));
756
+ return this.rest.get(import_v1011.Routes.webhook(id, token));
737
757
  }
738
758
  async create(channelId, data, reason) {
739
- return this.rest.post(import_v1010.Routes.channelWebhooks(channelId), {
759
+ return this.rest.post(import_v1011.Routes.channelWebhooks(channelId), {
740
760
  reason,
741
761
  body: data
742
762
  });
743
763
  }
744
764
  async edit(id, webhook, { token, reason } = {}) {
745
- return this.rest.patch(import_v1010.Routes.webhook(id, token), { reason, body: webhook });
765
+ return this.rest.patch(import_v1011.Routes.webhook(id, token), { reason, body: webhook });
746
766
  }
747
767
  async delete(id, { token, reason } = {}) {
748
- await this.rest.delete(import_v1010.Routes.webhook(id, token), { reason });
768
+ await this.rest.delete(import_v1011.Routes.webhook(id, token), { reason });
749
769
  }
750
770
  async execute(id, token, {
751
771
  wait,
@@ -753,7 +773,7 @@ var WebhooksAPI = class {
753
773
  files,
754
774
  ...body
755
775
  }) {
756
- return this.rest.post(import_v1010.Routes.webhook(id, token), {
776
+ return this.rest.post(import_v1011.Routes.webhook(id, token), {
757
777
  query: (0, import_rest6.makeURLSearchParams)({ wait, thread_id }),
758
778
  files,
759
779
  body,
@@ -761,34 +781,34 @@ var WebhooksAPI = class {
761
781
  });
762
782
  }
763
783
  async executeSlack(id, token, body, options = {}) {
764
- await this.rest.post(import_v1010.Routes.webhookPlatform(id, token, "slack"), {
784
+ await this.rest.post(import_v1011.Routes.webhookPlatform(id, token, "slack"), {
765
785
  query: (0, import_rest6.makeURLSearchParams)(options),
766
786
  body,
767
787
  auth: false
768
788
  });
769
789
  }
770
790
  async executeGitHub(id, token, body, options = {}) {
771
- await this.rest.post(import_v1010.Routes.webhookPlatform(id, token, "github"), {
791
+ await this.rest.post(import_v1011.Routes.webhookPlatform(id, token, "github"), {
772
792
  query: (0, import_rest6.makeURLSearchParams)(options),
773
793
  body,
774
794
  auth: false
775
795
  });
776
796
  }
777
797
  async getMessage(id, token, messageId, options = {}) {
778
- return this.rest.get(import_v1010.Routes.webhookMessage(id, token, messageId), {
798
+ return this.rest.get(import_v1011.Routes.webhookMessage(id, token, messageId), {
779
799
  query: (0, import_rest6.makeURLSearchParams)(options),
780
800
  auth: false
781
801
  });
782
802
  }
783
803
  async editMessage(id, token, messageId, { thread_id, ...body }) {
784
- return this.rest.patch(import_v1010.Routes.webhookMessage(id, token, messageId), {
804
+ return this.rest.patch(import_v1011.Routes.webhookMessage(id, token, messageId), {
785
805
  query: (0, import_rest6.makeURLSearchParams)({ thread_id }),
786
806
  auth: false,
787
807
  body
788
808
  });
789
809
  }
790
810
  async deleteMessage(id, token, messageId, options = {}) {
791
- await this.rest.delete(import_v1010.Routes.webhookMessage(id, token, messageId), {
811
+ await this.rest.delete(import_v1011.Routes.webhookMessage(id, token, messageId), {
792
812
  query: (0, import_rest6.makeURLSearchParams)(options),
793
813
  auth: false
794
814
  });
@@ -804,6 +824,7 @@ var API = class {
804
824
  this.channels = new ChannelsAPI(rest);
805
825
  this.guilds = new GuildsAPI(rest);
806
826
  this.invites = new InvitesAPI(rest);
827
+ this.roleConnections = new RoleConnectionsAPI(rest);
807
828
  this.stickers = new StickersAPI(rest);
808
829
  this.threads = new ThreadsAPI(rest);
809
830
  this.users = new UsersAPI(rest);
@@ -816,6 +837,7 @@ var API = class {
816
837
  guilds;
817
838
  interactions;
818
839
  invites;
840
+ roleConnections;
819
841
  stickers;
820
842
  threads;
821
843
  users;
@@ -872,6 +894,7 @@ __reExport(src_exports, require("discord-api-types/v10"), module.exports);
872
894
  GuildsAPI,
873
895
  InteractionsAPI,
874
896
  InvitesAPI,
897
+ RoleConnectionsAPI,
875
898
  StickersAPI,
876
899
  ThreadsAPI,
877
900
  UsersAPI,