seyfert 1.1.1 → 1.2.1

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 (156) hide show
  1. package/lib/api/Routes/applications.d.ts +2 -2
  2. package/lib/api/Routes/channels.d.ts +2 -2
  3. package/lib/api/Routes/gateway.d.ts +2 -2
  4. package/lib/api/Routes/guilds.d.ts +2 -1
  5. package/lib/api/Routes/interactions.d.ts +2 -2
  6. package/lib/api/Routes/invites.d.ts +2 -2
  7. package/lib/api/Routes/stage-instances.d.ts +2 -2
  8. package/lib/api/Routes/stickers.d.ts +2 -2
  9. package/lib/api/Routes/users.d.ts +2 -2
  10. package/lib/api/Routes/voice.d.ts +2 -2
  11. package/lib/api/Routes/webhooks.d.ts +2 -2
  12. package/lib/builders/ActionRow.d.ts +2 -1
  13. package/lib/builders/ActionRow.js +3 -3
  14. package/lib/builders/Base.d.ts +1 -1
  15. package/lib/builders/Button.d.ts +2 -1
  16. package/lib/builders/Button.js +2 -2
  17. package/lib/builders/Embed.d.ts +2 -1
  18. package/lib/builders/Modal.d.ts +9 -2
  19. package/lib/builders/Modal.js +12 -3
  20. package/lib/builders/SelectMenu.d.ts +18 -1
  21. package/lib/builders/SelectMenu.js +36 -12
  22. package/lib/builders/index.d.ts +1 -1
  23. package/lib/builders/index.js +9 -9
  24. package/lib/builders/types.d.ts +1 -1
  25. package/lib/cache/index.d.ts +5 -5
  26. package/lib/cache/index.js +3 -3
  27. package/lib/cache/resources/default/base.d.ts +1 -1
  28. package/lib/cache/resources/default/guild-based.d.ts +1 -1
  29. package/lib/cache/resources/default/guild-related.d.ts +1 -1
  30. package/lib/cache/resources/presence.d.ts +1 -1
  31. package/lib/cache/resources/stage-instances.d.ts +1 -1
  32. package/lib/cache/resources/voice-states.d.ts +1 -1
  33. package/lib/client/base.d.ts +4 -3
  34. package/lib/client/client.d.ts +2 -1
  35. package/lib/client/client.js +2 -2
  36. package/lib/client/httpclient.d.ts +2 -1
  37. package/lib/client/httpclient.js +34 -32
  38. package/lib/client/oninteractioncreate.js +11 -12
  39. package/lib/client/onmessagecreate.js +2 -3
  40. package/lib/client/workerclient.d.ts +3 -2
  41. package/lib/client/workerclient.js +4 -3
  42. package/lib/commands/applications/chat.d.ts +3 -3
  43. package/lib/commands/applications/chat.js +4 -3
  44. package/lib/commands/applications/chatcontext.d.ts +6 -9
  45. package/lib/commands/applications/chatcontext.js +6 -17
  46. package/lib/commands/applications/menu.d.ts +2 -1
  47. package/lib/commands/applications/menucontext.d.ts +6 -10
  48. package/lib/commands/applications/menucontext.js +9 -22
  49. package/lib/commands/basecontex.d.ts +15 -0
  50. package/lib/commands/basecontex.js +34 -0
  51. package/lib/commands/decorators.d.ts +2 -1
  52. package/lib/commands/decorators.js +4 -4
  53. package/lib/commands/handler.js +4 -3
  54. package/lib/commands/optionresolver.d.ts +3 -3
  55. package/lib/commands/optionresolver.js +14 -14
  56. package/lib/common/index.d.ts +0 -1
  57. package/lib/common/index.js +0 -1
  58. package/lib/common/it/constants.d.ts +3 -1
  59. package/lib/common/it/constants.js +2 -0
  60. package/lib/common/shorters/channels.d.ts +1 -1
  61. package/lib/common/shorters/channels.js +4 -4
  62. package/lib/common/shorters/guilds.d.ts +1 -1
  63. package/lib/common/shorters/guilds.js +6 -1
  64. package/lib/common/shorters/members.d.ts +6 -1
  65. package/lib/common/shorters/members.js +25 -2
  66. package/lib/common/shorters/webhook.d.ts +2 -2
  67. package/lib/common/types/resolvables.d.ts +2 -1
  68. package/lib/common/types/util.d.ts +1 -1
  69. package/lib/common/types/write.d.ts +1 -1
  70. package/lib/components/ActionRow.d.ts +4 -3
  71. package/lib/components/ActionRow.js +6 -3
  72. package/lib/components/BaseComponent.d.ts +18 -0
  73. package/lib/components/BaseComponent.js +21 -0
  74. package/lib/components/BaseSelectMenuComponent.d.ts +10 -0
  75. package/lib/components/BaseSelectMenuComponent.js +22 -0
  76. package/lib/components/ButtonComponent.d.ts +14 -14
  77. package/lib/components/ButtonComponent.js +36 -25
  78. package/lib/components/ChannelSelectMenuComponent.d.ts +4 -4
  79. package/lib/components/ChannelSelectMenuComponent.js +6 -5
  80. package/lib/components/MentionableSelectMenuComponent.d.ts +3 -2
  81. package/lib/components/MentionableSelectMenuComponent.js +4 -1
  82. package/lib/components/RoleSelectMenuComponent.d.ts +3 -2
  83. package/lib/components/RoleSelectMenuComponent.js +4 -1
  84. package/lib/components/StringSelectMenuComponent.d.ts +3 -4
  85. package/lib/components/StringSelectMenuComponent.js +3 -5
  86. package/lib/components/TextInputComponent.d.ts +10 -5
  87. package/lib/components/TextInputComponent.js +24 -7
  88. package/lib/components/UserSelectMenuComponent.d.ts +3 -2
  89. package/lib/components/UserSelectMenuComponent.js +4 -1
  90. package/lib/components/command.d.ts +6 -5
  91. package/lib/components/command.js +4 -0
  92. package/lib/components/componentcontext.d.ts +113 -0
  93. package/lib/components/componentcontext.js +135 -0
  94. package/lib/components/handler.d.ts +3 -3
  95. package/lib/components/handler.js +9 -4
  96. package/lib/components/index.d.ts +3 -2
  97. package/lib/components/index.js +10 -9
  98. package/lib/events/handler.d.ts +2 -1
  99. package/lib/events/hooks/application_command.d.ts +2 -2
  100. package/lib/events/hooks/auto_moderation.d.ts +4 -4
  101. package/lib/events/hooks/channel.d.ts +1 -1
  102. package/lib/events/hooks/dispatch.d.ts +1 -1
  103. package/lib/events/hooks/entitlement.d.ts +4 -4
  104. package/lib/events/hooks/guild.d.ts +42 -42
  105. package/lib/events/hooks/integration.d.ts +19 -19
  106. package/lib/events/hooks/interactions.d.ts +2 -2
  107. package/lib/events/hooks/invite.d.ts +5 -5
  108. package/lib/events/hooks/message.d.ts +6 -5
  109. package/lib/events/hooks/presence.d.ts +7 -7
  110. package/lib/events/hooks/stage.d.ts +4 -4
  111. package/lib/events/hooks/thread.d.ts +49 -49
  112. package/lib/events/hooks/typing.d.ts +2 -2
  113. package/lib/events/hooks/user.d.ts +1 -1
  114. package/lib/events/hooks/voice.d.ts +2 -2
  115. package/lib/events/hooks/webhook.d.ts +1 -1
  116. package/lib/index.d.ts +3 -6
  117. package/lib/index.js +6 -7
  118. package/lib/langs/handler.d.ts +2 -1
  119. package/lib/structures/AutoModerationRule.d.ts +3 -2
  120. package/lib/structures/ClientUser.d.ts +1 -1
  121. package/lib/structures/Guild.d.ts +27 -27
  122. package/lib/structures/GuildEmoji.d.ts +2 -1
  123. package/lib/structures/GuildMember.d.ts +15 -6
  124. package/lib/structures/GuildMember.js +32 -6
  125. package/lib/structures/GuildPreview.d.ts +1 -1
  126. package/lib/structures/GuildRole.d.ts +2 -1
  127. package/lib/structures/GuildTemplate.d.ts +3 -2
  128. package/lib/structures/Interaction.d.ts +3 -3
  129. package/lib/structures/Interaction.js +33 -33
  130. package/lib/structures/Message.d.ts +5 -4
  131. package/lib/structures/Sticker.d.ts +2 -1
  132. package/lib/structures/User.d.ts +6 -3
  133. package/lib/structures/User.js +2 -1
  134. package/lib/structures/Webhook.d.ts +63 -4
  135. package/lib/structures/Webhook.js +53 -0
  136. package/lib/structures/channels.d.ts +2 -2
  137. package/lib/structures/extra/BaseGuild.d.ts +2 -1
  138. package/lib/structures/extra/BaseGuild.js +3 -3
  139. package/lib/structures/extra/BitField.d.ts +2 -2
  140. package/lib/structures/extra/BitField.js +2 -2
  141. package/lib/structures/extra/Permissions.d.ts +1 -1
  142. package/lib/structures/extra/functions.d.ts +2 -1
  143. package/lib/structures/extra/functions.js +2 -1
  144. package/lib/types/index.d.ts +1 -0
  145. package/lib/types/index.js +17 -0
  146. package/lib/websocket/SharedTypes.d.ts +2 -1
  147. package/lib/websocket/SharedTypes.js +1 -0
  148. package/lib/websocket/discord/shard.d.ts +2 -1
  149. package/lib/websocket/discord/shard.js +30 -41
  150. package/lib/websocket/discord/sharder.d.ts +3 -2
  151. package/lib/websocket/discord/sharder.js +7 -6
  152. package/lib/websocket/discord/shared.d.ts +2 -1
  153. package/lib/websocket/discord/worker.d.ts +1 -1
  154. package/lib/websocket/discord/workermanager.d.ts +3 -2
  155. package/lib/websocket/discord/workermanager.js +1 -1
  156. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
- import type { RESTGetAPIApplicationCommandResult, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPatchAPIApplicationCommandJSONBody, RESTPatchAPIApplicationCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPostAPIApplicationCommandsJSONBody, RESTPostAPIApplicationCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPutAPIGuildApplicationCommandsPermissionsResult } from '../../common';
2
- import type { RestArguments } from '../api';
1
+ import type { RESTGetAPIApplicationCommandResult, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPatchAPIApplicationCommandJSONBody, RESTPatchAPIApplicationCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPostAPIApplicationCommandsJSONBody, RESTPostAPIApplicationCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPutAPIGuildApplicationCommandsPermissionsResult } from 'discord-api-types/v10';
3
2
  import type { ProxyRequestMethod } from '../Router';
3
+ import type { RestArguments } from '../api';
4
4
  export interface ApplicationRoutes {
5
5
  applications: (id: string) => {
6
6
  guilds: (id: string) => {
@@ -1,6 +1,6 @@
1
- import type { RESTDeleteAPIChannelAllMessageReactionsResult, RESTDeleteAPIChannelMessageReactionResult, RESTDeleteAPIChannelMessageResult, RESTDeleteAPIChannelPermissionResult, RESTDeleteAPIChannelPinResult, RESTDeleteAPIChannelRecipientResult, RESTDeleteAPIChannelResult, RESTDeleteAPIChannelThreadMembersResult, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTGetAPIChannelMessageResult, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTGetAPIChannelResult, RESTGetAPIChannelThreadMemberQuery, RESTGetAPIChannelThreadMemberResult, RESTGetAPIChannelThreadMembersQuery, RESTGetAPIChannelThreadMembersResult, RESTGetAPIChannelThreadsArchivedPrivateResult, RESTGetAPIChannelThreadsArchivedPublicResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTGetAPIGuildWebhooksResult, RESTPatchAPIChannelJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageResult, RESTPatchAPIChannelResult, RESTPostAPIChannelFollowersJSONBody, RESTPostAPIChannelFollowersResult, RESTPostAPIChannelInviteJSONBody, RESTPostAPIChannelInviteResult, RESTPostAPIChannelMessageCrosspostResult, RESTPostAPIChannelMessageJSONBody, RESTPostAPIChannelMessageResult, RESTPostAPIChannelMessagesBulkDeleteJSONBody, RESTPostAPIChannelMessagesBulkDeleteResult, RESTPostAPIChannelMessagesThreadsJSONBody, RESTPostAPIChannelMessagesThreadsResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIChannelTypingResult, RESTPostAPIChannelWebhookJSONBody, RESTPostAPIChannelWebhookResult, RESTPostAPIGuildForumThreadsJSONBody, RESTPutAPIChannelMessageReactionResult, RESTPutAPIChannelPermissionJSONBody, RESTPutAPIChannelPermissionResult, RESTPutAPIChannelPinResult, RESTPutAPIChannelRecipientJSONBody, RESTPutAPIChannelRecipientResult, RESTPutAPIChannelThreadMembersResult } from '../../common';
2
- import type { RestArguments } from '../api';
1
+ import type { RESTDeleteAPIChannelAllMessageReactionsResult, RESTDeleteAPIChannelMessageReactionResult, RESTDeleteAPIChannelMessageResult, RESTDeleteAPIChannelPermissionResult, RESTDeleteAPIChannelPinResult, RESTDeleteAPIChannelRecipientResult, RESTDeleteAPIChannelResult, RESTDeleteAPIChannelThreadMembersResult, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTGetAPIChannelMessageResult, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTGetAPIChannelResult, RESTGetAPIChannelThreadMemberQuery, RESTGetAPIChannelThreadMemberResult, RESTGetAPIChannelThreadMembersQuery, RESTGetAPIChannelThreadMembersResult, RESTGetAPIChannelThreadsArchivedPrivateResult, RESTGetAPIChannelThreadsArchivedPublicResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTGetAPIGuildWebhooksResult, RESTPatchAPIChannelJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageResult, RESTPatchAPIChannelResult, RESTPostAPIChannelFollowersJSONBody, RESTPostAPIChannelFollowersResult, RESTPostAPIChannelInviteJSONBody, RESTPostAPIChannelInviteResult, RESTPostAPIChannelMessageCrosspostResult, RESTPostAPIChannelMessageJSONBody, RESTPostAPIChannelMessageResult, RESTPostAPIChannelMessagesBulkDeleteJSONBody, RESTPostAPIChannelMessagesBulkDeleteResult, RESTPostAPIChannelMessagesThreadsJSONBody, RESTPostAPIChannelMessagesThreadsResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIChannelTypingResult, RESTPostAPIChannelWebhookJSONBody, RESTPostAPIChannelWebhookResult, RESTPostAPIGuildForumThreadsJSONBody, RESTPutAPIChannelMessageReactionResult, RESTPutAPIChannelPermissionJSONBody, RESTPutAPIChannelPermissionResult, RESTPutAPIChannelPinResult, RESTPutAPIChannelRecipientJSONBody, RESTPutAPIChannelRecipientResult, RESTPutAPIChannelThreadMembersResult } from 'discord-api-types/v10';
3
2
  import type { ProxyRequestMethod } from '../Router';
3
+ import type { RestArguments } from '../api';
4
4
  export interface ChannelRoutes {
5
5
  channels(id: string): {
6
6
  get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIChannelResult>;
@@ -1,6 +1,6 @@
1
- import type { RESTGetAPIGatewayBotResult, RESTGetAPIGatewayResult } from '../../common';
2
- import type { RestArguments } from '../api';
1
+ import type { RESTGetAPIGatewayBotResult, RESTGetAPIGatewayResult } from 'discord-api-types/v10';
3
2
  import type { ProxyRequestMethod } from '../Router';
3
+ import type { RestArguments } from '../api';
4
4
  export interface GatewayRoutes {
5
5
  gateway: {
6
6
  get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGatewayResult>;
@@ -1,4 +1,5 @@
1
- import type { APIThreadChannel, Identify, OmitInsert, RESTDeleteAPIAutoModerationRuleResult, RESTDeleteAPIGuildBanResult, RESTDeleteAPIGuildEmojiResult, RESTDeleteAPIGuildIntegrationResult, RESTDeleteAPIGuildMemberResult, RESTDeleteAPIGuildMemberRoleResult, RESTDeleteAPIGuildResult, RESTDeleteAPIGuildRoleResult, RESTDeleteAPIGuildScheduledEventResult, RESTDeleteAPIGuildStickerResult, RESTDeleteAPIGuildTemplateResult, RESTGetAPIAuditLogQuery, RESTGetAPIAuditLogResult, RESTGetAPIAutoModerationRuleResult, RESTGetAPIAutoModerationRulesResult, RESTGetAPIGuildBanResult, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTGetAPIGuildChannelsResult, RESTGetAPIGuildEmojiResult, RESTGetAPIGuildEmojisResult, RESTGetAPIGuildIntegrationsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTGetAPIGuildPreviewResult, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTGetAPIGuildQuery, RESTGetAPIGuildResult, RESTGetAPIGuildRolesResult, RESTGetAPIGuildScheduledEventQuery, RESTGetAPIGuildScheduledEventResult, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTGetAPIGuildStickerResult, RESTGetAPIGuildStickersResult, RESTGetAPIGuildTemplatesResult, RESTGetAPIGuildThreadsResult, RESTGetAPIGuildVanityUrlResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildWebhooksResult, RESTGetAPIGuildWelcomeScreenResult, RESTGetAPIGuildWidgetImageQuery, RESTGetAPIGuildWidgetImageResult, RESTGetAPIGuildWidgetJSONResult, RESTGetAPIGuildWidgetSettingsResult, RESTGetAPITemplateResult, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleResult, RESTPatchAPICurrentGuildMemberJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildChannelPositionsResult, RESTPatchAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiResult, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildMemberJSONBody, RESTPatchAPIGuildMemberResult, RESTPatchAPIGuildResult, RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleResult, RESTPatchAPIGuildScheduledEventJSONBody, RESTPatchAPIGuildScheduledEventResult, RESTPatchAPIGuildStickerJSONBody, RESTPatchAPIGuildStickerResult, RESTPatchAPIGuildTemplateJSONBody, RESTPatchAPIGuildTemplateResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberResult, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTPatchAPIGuildVoiceStateUserResult, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildWelcomeScreenResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTPatchAPIGuildWidgetSettingsResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIAutoModerationRuleResult, RESTPostAPIGuildChannelJSONBody, RESTPostAPIGuildChannelResult, RESTPostAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTPostAPIGuildRoleJSONBody, RESTPostAPIGuildRoleResult, RESTPostAPIGuildScheduledEventJSONBody, RESTPostAPIGuildScheduledEventResult, RESTPostAPIGuildStickerFormDataBody, RESTPostAPIGuildStickerResult, RESTPostAPIGuildTemplatesJSONBody, RESTPostAPIGuildTemplatesResult, RESTPostAPIGuildsJSONBody, RESTPostAPIGuildsMFAJSONBody, RESTPostAPIGuildsMFAResult, RESTPostAPIGuildsResult, RESTPostAPITemplateCreateGuildJSONBody, RESTPostAPITemplateCreateGuildResult, RESTPutAPIGuildBanJSONBody, RESTPutAPIGuildBanResult, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTPutAPIGuildMemberRoleResult, RESTPutAPIGuildTemplateSyncResult } from '../../common';
1
+ import type { APIThreadChannel, RESTDeleteAPIAutoModerationRuleResult, RESTDeleteAPIGuildBanResult, RESTDeleteAPIGuildEmojiResult, RESTDeleteAPIGuildIntegrationResult, RESTDeleteAPIGuildMemberResult, RESTDeleteAPIGuildMemberRoleResult, RESTDeleteAPIGuildResult, RESTDeleteAPIGuildRoleResult, RESTDeleteAPIGuildScheduledEventResult, RESTDeleteAPIGuildStickerResult, RESTDeleteAPIGuildTemplateResult, RESTGetAPIAuditLogQuery, RESTGetAPIAuditLogResult, RESTGetAPIAutoModerationRuleResult, RESTGetAPIAutoModerationRulesResult, RESTGetAPIGuildBanResult, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTGetAPIGuildChannelsResult, RESTGetAPIGuildEmojiResult, RESTGetAPIGuildEmojisResult, RESTGetAPIGuildIntegrationsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTGetAPIGuildPreviewResult, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTGetAPIGuildQuery, RESTGetAPIGuildResult, RESTGetAPIGuildRolesResult, RESTGetAPIGuildScheduledEventQuery, RESTGetAPIGuildScheduledEventResult, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTGetAPIGuildStickerResult, RESTGetAPIGuildStickersResult, RESTGetAPIGuildTemplatesResult, RESTGetAPIGuildThreadsResult, RESTGetAPIGuildVanityUrlResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildWebhooksResult, RESTGetAPIGuildWelcomeScreenResult, RESTGetAPIGuildWidgetImageQuery, RESTGetAPIGuildWidgetImageResult, RESTGetAPIGuildWidgetJSONResult, RESTGetAPIGuildWidgetSettingsResult, RESTGetAPITemplateResult, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleResult, RESTPatchAPICurrentGuildMemberJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildChannelPositionsResult, RESTPatchAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiResult, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildMemberJSONBody, RESTPatchAPIGuildMemberResult, RESTPatchAPIGuildResult, RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleResult, RESTPatchAPIGuildScheduledEventJSONBody, RESTPatchAPIGuildScheduledEventResult, RESTPatchAPIGuildStickerJSONBody, RESTPatchAPIGuildStickerResult, RESTPatchAPIGuildTemplateJSONBody, RESTPatchAPIGuildTemplateResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberResult, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTPatchAPIGuildVoiceStateUserResult, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildWelcomeScreenResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTPatchAPIGuildWidgetSettingsResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIAutoModerationRuleResult, RESTPostAPIGuildChannelJSONBody, RESTPostAPIGuildChannelResult, RESTPostAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTPostAPIGuildRoleJSONBody, RESTPostAPIGuildRoleResult, RESTPostAPIGuildScheduledEventJSONBody, RESTPostAPIGuildScheduledEventResult, RESTPostAPIGuildStickerFormDataBody, RESTPostAPIGuildStickerResult, RESTPostAPIGuildTemplatesJSONBody, RESTPostAPIGuildTemplatesResult, RESTPostAPIGuildsJSONBody, RESTPostAPIGuildsMFAJSONBody, RESTPostAPIGuildsMFAResult, RESTPostAPIGuildsResult, RESTPostAPITemplateCreateGuildJSONBody, RESTPostAPITemplateCreateGuildResult, RESTPutAPIGuildBanJSONBody, RESTPutAPIGuildBanResult, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTPutAPIGuildMemberRoleResult, RESTPutAPIGuildTemplateSyncResult } from 'discord-api-types/v10';
2
+ import type { Identify, OmitInsert } from '../../common';
2
3
  import type { ProxyRequestMethod } from '../Router';
3
4
  import type { RestArguments } from '../api';
4
5
  import type { RawFile } from '../shared';
@@ -1,6 +1,6 @@
1
- import type { RESTPostAPIInteractionCallbackJSONBody } from '../../common';
2
- import type { RestArguments } from '../api';
1
+ import type { RESTPostAPIInteractionCallbackJSONBody } from 'discord-api-types/v10';
3
2
  import type { ProxyRequestMethod } from '../Router';
3
+ import type { RestArguments } from '../api';
4
4
  export interface InteractionRoutes {
5
5
  interactions: (id: string) => (token: string) => {
6
6
  callback: {
@@ -1,6 +1,6 @@
1
- import type { RESTDeleteAPIInviteResult, RESTGetAPIInviteQuery, RESTGetAPIInviteResult } from '../../common';
2
- import type { RestArguments } from '../api';
1
+ import type { RESTDeleteAPIInviteResult, RESTGetAPIInviteQuery, RESTGetAPIInviteResult } from 'discord-api-types/v10';
3
2
  import type { ProxyRequestMethod } from '../Router';
3
+ import type { RestArguments } from '../api';
4
4
  export interface InviteRoutes {
5
5
  invites(id: string): {
6
6
  get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIInviteQuery>): Promise<RESTGetAPIInviteResult>;
@@ -1,6 +1,6 @@
1
- import type { RESTDeleteAPIStageInstanceResult, RESTGetAPIStageInstanceResult, RESTPatchAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceResult, RESTPostAPIStageInstanceJSONBody, RESTPostAPIStageInstanceResult } from '../../common';
2
- import type { RestArguments } from '../api';
1
+ import type { RESTDeleteAPIStageInstanceResult, RESTGetAPIStageInstanceResult, RESTPatchAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceResult, RESTPostAPIStageInstanceJSONBody, RESTPostAPIStageInstanceResult } from 'discord-api-types/v10';
3
2
  import type { ProxyRequestMethod } from '../Router';
3
+ import type { RestArguments } from '../api';
4
4
  export interface StageInstanceRoutes {
5
5
  'stage-instances': {
6
6
  post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIStageInstanceJSONBody>): Promise<RESTPostAPIStageInstanceResult>;
@@ -1,6 +1,6 @@
1
- import type { RESTGetAPIStickerResult, RESTGetNitroStickerPacksResult } from '../../common';
2
- import type { RestArguments } from '../api';
1
+ import type { RESTGetAPIStickerResult, RESTGetNitroStickerPacksResult } from 'discord-api-types/v10';
3
2
  import type { ProxyRequestMethod } from '../Router';
3
+ import type { RestArguments } from '../api';
4
4
  export interface StickerRoutes {
5
5
  stickers(id: string): {
6
6
  get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIStickerResult>;
@@ -1,6 +1,6 @@
1
- import type { APIDMChannel, RESTDeleteAPIGuildResult, RESTGetAPICurrentUserApplicationRoleConnectionResult, RESTGetAPICurrentUserConnectionsResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTGetAPICurrentUserResult, RESTGetAPIUserResult, RESTGetCurrentUserGuildMemberResult, RESTPatchAPICurrentUserJSONBody, RESTPatchAPICurrentUserResult, RESTPostAPICurrentUserCreateDMChannelJSONBody, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTPutAPICurrentUserApplicationRoleConnectionResult } from '../../common';
2
- import type { RestArguments } from '../api';
1
+ import type { APIDMChannel, RESTDeleteAPIGuildResult, RESTGetAPICurrentUserApplicationRoleConnectionResult, RESTGetAPICurrentUserConnectionsResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTGetAPICurrentUserResult, RESTGetAPIUserResult, RESTGetCurrentUserGuildMemberResult, RESTPatchAPICurrentUserJSONBody, RESTPatchAPICurrentUserResult, RESTPostAPICurrentUserCreateDMChannelJSONBody, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTPutAPICurrentUserApplicationRoleConnectionResult } from 'discord-api-types/v10';
3
2
  import type { ProxyRequestMethod } from '../Router';
3
+ import type { RestArguments } from '../api';
4
4
  export interface UserRoutes {
5
5
  users: {
6
6
  (id: string): {
@@ -1,6 +1,6 @@
1
- import type { RESTGetAPIVoiceRegionsResult } from '../../common';
2
- import type { RestArguments } from '../api';
1
+ import type { RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
3
2
  import type { ProxyRequestMethod } from '../Router';
3
+ import type { RestArguments } from '../api';
4
4
  export interface VoiceRoutes {
5
5
  voice: {
6
6
  region: {
@@ -1,6 +1,6 @@
1
- import type { RESTDeleteAPIWebhookResult, RESTDeleteAPIWebhookWithTokenMessageResult, RESTDeleteAPIWebhookWithTokenResult, RESTGetAPIWebhookResult, RESTGetAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenResult, RESTPatchAPIWebhookJSONBody, RESTPatchAPIWebhookResult, RESTPatchAPIWebhookWithTokenJSONBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenResult, RESTPostAPIWebhookWithTokenGitHubQuery, RESTPostAPIWebhookWithTokenGitHubResult, RESTPostAPIWebhookWithTokenGitHubWaitResult, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenSlackResult, RESTPostAPIWebhookWithTokenSlackWaitResult, RESTPostAPIWebhookWithTokenWaitResult } from '../../common';
2
- import type { RestArguments } from '../api';
1
+ import type { RESTDeleteAPIWebhookResult, RESTDeleteAPIWebhookWithTokenMessageResult, RESTDeleteAPIWebhookWithTokenResult, RESTGetAPIWebhookResult, RESTGetAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenResult, RESTPatchAPIWebhookJSONBody, RESTPatchAPIWebhookResult, RESTPatchAPIWebhookWithTokenJSONBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenResult, RESTPostAPIWebhookWithTokenGitHubQuery, RESTPostAPIWebhookWithTokenGitHubResult, RESTPostAPIWebhookWithTokenGitHubWaitResult, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenSlackResult, RESTPostAPIWebhookWithTokenSlackWaitResult, RESTPostAPIWebhookWithTokenWaitResult } from 'discord-api-types/v10';
3
2
  import type { ProxyRequestMethod } from '../Router';
3
+ import type { RestArguments } from '../api';
4
4
  export interface WebhookRoutes {
5
5
  webhooks(id: string): {
6
6
  get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIWebhookResult>;
@@ -1,4 +1,5 @@
1
- import { type APIActionRowComponent, type APIActionRowComponentTypes, type APIMessageActionRowComponent, type RestOrArray } from '../common';
1
+ import { type APIActionRowComponent, type APIActionRowComponentTypes, type APIMessageActionRowComponent } from 'discord-api-types/v10';
2
+ import type { RestOrArray } from '../common/types/util';
2
3
  import { BaseComponentBuilder } from './Base';
3
4
  import type { BuilderComponents, FixedComponents } from './types';
4
5
  /**
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActionRow = void 0;
4
- const common_1 = require("../common");
4
+ const v10_1 = require("discord-api-types/v10");
5
5
  const Base_1 = require("./Base");
6
6
  const index_1 = require("./index");
7
7
  /**
@@ -16,7 +16,7 @@ class ActionRow extends Base_1.BaseComponentBuilder {
16
16
  * const actionRow = new ActionRow<Button>({ components: [buttonRawJSON] });
17
17
  */
18
18
  constructor({ components, ...data } = {}) {
19
- super({ ...data, type: common_1.ComponentType.ActionRow });
19
+ super({ ...data, type: v10_1.ComponentType.ActionRow });
20
20
  this.components = (components?.map(index_1.fromComponent) ?? []);
21
21
  }
22
22
  components;
@@ -52,7 +52,7 @@ class ActionRow extends Base_1.BaseComponentBuilder {
52
52
  const components = this.components.map(c => {
53
53
  return c.toJSON();
54
54
  });
55
- return { type: common_1.ComponentType.ActionRow, components };
55
+ return { type: v10_1.ComponentType.ActionRow, components };
56
56
  }
57
57
  }
58
58
  exports.ActionRow = ActionRow;
@@ -1,4 +1,4 @@
1
- import type { APIBaseComponent, ComponentType } from '../common';
1
+ import type { APIBaseComponent, ComponentType } from 'discord-api-types/v10';
2
2
  export declare abstract class BaseComponentBuilder<TYPE extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>> {
3
3
  data: Partial<TYPE>;
4
4
  constructor(data: Partial<TYPE>);
@@ -1,4 +1,5 @@
1
- import { type APIButtonComponentWithCustomId, type APIButtonComponentWithURL, type ButtonStyle, type EmojiResolvable, type When } from '../common';
1
+ import { type APIButtonComponentWithCustomId, type APIButtonComponentWithURL, type ButtonStyle } from 'discord-api-types/v10';
2
+ import type { EmojiResolvable, When } from '../common';
2
3
  export type ButtonStylesForID = Exclude<ButtonStyle, ButtonStyle.Link>;
3
4
  /**
4
5
  * Represents a button component.
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Button = void 0;
4
+ const v10_1 = require("discord-api-types/v10");
4
5
  const __1 = require("..");
5
- const common_1 = require("../common");
6
6
  const functions_1 = require("../structures/extra/functions");
7
7
  /**
8
8
  * Represents a button component.
@@ -16,7 +16,7 @@ class Button {
16
16
  */
17
17
  constructor(data = {}) {
18
18
  this.data = data;
19
- this.data.type = common_1.ComponentType.Button;
19
+ this.data.type = v10_1.ComponentType.Button;
20
20
  }
21
21
  /**
22
22
  * Sets the custom ID for the button.
@@ -1,4 +1,5 @@
1
- import { type APIEmbed, type APIEmbedAuthor, type APIEmbedField, type APIEmbedFooter, type ColorResolvable, type ObjectToLower, type RestOrArray } from '../common';
1
+ import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter } from 'discord-api-types/v10';
2
+ import { type ColorResolvable, type ObjectToLower, type RestOrArray } from '../common';
2
3
  /**
3
4
  * Represents a message embed.
4
5
  * @example
@@ -1,4 +1,5 @@
1
- import { type APIModalInteractionResponseCallbackData, type APITextInputComponent, type RestOrArray, type TextInputStyle } from '../common';
1
+ import { type APIModalInteractionResponseCallbackData, type APITextInputComponent, type TextInputStyle } from 'discord-api-types/v10';
2
+ import type { RestOrArray } from '../common';
2
3
  import type { ActionRow } from './ActionRow';
3
4
  import { BaseComponentBuilder, type OptionValuesLength } from './Base';
4
5
  import type { ModalBuilderComponents, ModalSubmitCallback } from './types';
@@ -28,6 +29,12 @@ export declare class Modal<T extends ModalBuilderComponents = TextInput> {
28
29
  * @returns The current Modal instance.
29
30
  */
30
31
  addComponents(...components: RestOrArray<ActionRow<T>>): this;
32
+ /**
33
+ * Set the components to the modal.
34
+ * @param component - The components to set into the modal.
35
+ * @returns The current Modal instance.
36
+ */
37
+ setComponents(component: ActionRow<T>[]): this;
31
38
  /**
32
39
  * Sets the title of the modal.
33
40
  * @param title - The title of the modal.
@@ -56,7 +63,7 @@ export declare class Modal<T extends ModalBuilderComponents = TextInput> {
56
63
  * Represents a text input component builder.
57
64
  * @example
58
65
  * const textInput = new TextInput().setLabel("Enter text");
59
- * textInput.setStyle(TextInputStyle.FULL);
66
+ * textInput.setStyle(TextInputStyle.Paragraph);
60
67
  * textInput.setPlaceholder("Type here");
61
68
  * const json = textInput.toJSON();
62
69
  */
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TextInput = exports.Modal = void 0;
4
- const common_1 = require("../common");
4
+ const v10_1 = require("discord-api-types/v10");
5
5
  const Base_1 = require("./Base");
6
6
  const index_1 = require("./index");
7
7
  /**
@@ -38,6 +38,15 @@ class Modal {
38
38
  this.components = this.components.concat(components.flat());
39
39
  return this;
40
40
  }
41
+ /**
42
+ * Set the components to the modal.
43
+ * @param component - The components to set into the modal.
44
+ * @returns The current Modal instance.
45
+ */
46
+ setComponents(component) {
47
+ this.components = [...component];
48
+ return this;
49
+ }
41
50
  /**
42
51
  * Sets the title of the modal.
43
52
  * @param title - The title of the modal.
@@ -82,7 +91,7 @@ exports.Modal = Modal;
82
91
  * Represents a text input component builder.
83
92
  * @example
84
93
  * const textInput = new TextInput().setLabel("Enter text");
85
- * textInput.setStyle(TextInputStyle.FULL);
94
+ * textInput.setStyle(TextInputStyle.Paragraph);
86
95
  * textInput.setPlaceholder("Type here");
87
96
  * const json = textInput.toJSON();
88
97
  */
@@ -92,7 +101,7 @@ class TextInput extends Base_1.BaseComponentBuilder {
92
101
  * @param data - Optional data for the text input.
93
102
  */
94
103
  constructor(data = {}) {
95
- super({ ...data, type: common_1.ComponentType.TextInput });
104
+ super({ ...data, type: v10_1.ComponentType.TextInput });
96
105
  }
97
106
  /**
98
107
  * Sets the style of the text input.
@@ -1,4 +1,5 @@
1
- import { type APIChannelSelectComponent, type APIMentionableSelectComponent, type APIRoleSelectComponent, type APISelectMenuComponent, type APISelectMenuOption, type APIStringSelectComponent, type APIUserSelectComponent, type ChannelType, type EmojiResolvable, type RestOrArray, type ToClass } from '../common';
1
+ import { type APIChannelSelectComponent, type APIMentionableSelectComponent, type APIRoleSelectComponent, type APISelectMenuComponent, type APISelectMenuOption, type APIStringSelectComponent, type APIUserSelectComponent, type ChannelType, SelectMenuDefaultValueType } from 'discord-api-types/v10';
2
+ import type { EmojiResolvable, RestOrArray, ToClass } from '../common';
2
3
  import type { ChannelSelectMenuInteraction, ComponentInteraction, MentionableSelectMenuInteraction, RoleSelectMenuInteraction, StringSelectMenuInteraction, UserSelectMenuInteraction } from '../structures';
3
4
  import { BaseComponentBuilder, type OptionValuesLength } from './Base';
4
5
  export type BuilderSelectMenus = RoleSelectMenu | UserSelectMenu | MentionableSelectMenu | ChannelSelectMenu | StringSelectMenu;
@@ -84,6 +85,10 @@ export declare class RoleSelectMenu extends SelectMenu<APIRoleSelectComponent, R
84
85
  */
85
86
  setDefaultRoles(...roles: RestOrArray<string>): this;
86
87
  }
88
+ export type MentionableDefaultElement = {
89
+ id: string;
90
+ type: keyof Omit<typeof SelectMenuDefaultValueType, 'Channel'>;
91
+ };
87
92
  /**
88
93
  * Represents a Select Menu for selecting mentionable entities.
89
94
  * @example
@@ -92,6 +97,18 @@ export declare class RoleSelectMenu extends SelectMenu<APIRoleSelectComponent, R
92
97
  */
93
98
  export declare class MentionableSelectMenu extends SelectMenu<APIMentionableSelectComponent, MentionableSelectMenuInteraction> {
94
99
  constructor(data?: Partial<APIMentionableSelectComponent>);
100
+ /**
101
+ * Sets the default selected roles or users for the select menu.
102
+ * @param mentionables - Role/User id and type to be set as default.
103
+ * @returns The current MentionableSelectMenu instance.
104
+ */
105
+ setDefaultMentionables(...mentionables: RestOrArray<MentionableDefaultElement>): this;
106
+ /**
107
+ * Adds default selected roles or users for the select menu.
108
+ * @param mentionables - Role/User id and type to be added as default.
109
+ * @returns The current MentionableSelectMenu instance.
110
+ */
111
+ addDefaultMentionables(...mentionables: RestOrArray<MentionableDefaultElement>): this;
95
112
  }
96
113
  /**
97
114
  * Represents a Select Menu for selecting channels.
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StringSelectOption = exports.StringSelectMenu = exports.ChannelSelectMenu = exports.MentionableSelectMenu = exports.RoleSelectMenu = exports.UserSelectMenu = exports.SelectMenu = void 0;
4
+ const v10_1 = require("discord-api-types/v10");
4
5
  const __1 = require("..");
5
- const common_1 = require("../common");
6
6
  const functions_1 = require("../structures/extra/functions");
7
7
  const Base_1 = require("./Base");
8
8
  /**
@@ -76,7 +76,7 @@ exports.SelectMenu = SelectMenu;
76
76
  */
77
77
  class UserSelectMenu extends SelectMenu {
78
78
  constructor(data = {}) {
79
- super({ ...data, type: common_1.ComponentType.UserSelect });
79
+ super({ ...data, type: v10_1.ComponentType.UserSelect });
80
80
  }
81
81
  /**
82
82
  * Adds default selected users to the select menu.
@@ -84,7 +84,7 @@ class UserSelectMenu extends SelectMenu {
84
84
  * @returns The current UserSelectMenu instance.
85
85
  */
86
86
  addDefaultUsers(...users) {
87
- this.data.default_values = (this.data.default_values ?? []).concat(mappedDefault(users, common_1.SelectMenuDefaultValueType.User));
87
+ this.data.default_values = (this.data.default_values ?? []).concat(mappedDefault(users, v10_1.SelectMenuDefaultValueType.User));
88
88
  return this;
89
89
  }
90
90
  /**
@@ -93,7 +93,7 @@ class UserSelectMenu extends SelectMenu {
93
93
  * @returns The current UserSelectMenu instance.
94
94
  */
95
95
  setDefaultUsers(...users) {
96
- this.data.default_values = mappedDefault(users, common_1.SelectMenuDefaultValueType.User);
96
+ this.data.default_values = mappedDefault(users, v10_1.SelectMenuDefaultValueType.User);
97
97
  return this;
98
98
  }
99
99
  }
@@ -107,7 +107,7 @@ exports.UserSelectMenu = UserSelectMenu;
107
107
  */
108
108
  class RoleSelectMenu extends SelectMenu {
109
109
  constructor(data = {}) {
110
- super({ ...data, type: common_1.ComponentType.RoleSelect });
110
+ super({ ...data, type: v10_1.ComponentType.RoleSelect });
111
111
  }
112
112
  /**
113
113
  * Adds default selected roles to the select menu.
@@ -115,7 +115,7 @@ class RoleSelectMenu extends SelectMenu {
115
115
  * @returns The current RoleSelectMenu instance.
116
116
  */
117
117
  addDefaultRoles(...roles) {
118
- this.data.default_values = (this.data.default_values ?? []).concat(mappedDefault(roles, common_1.SelectMenuDefaultValueType.Role));
118
+ this.data.default_values = (this.data.default_values ?? []).concat(mappedDefault(roles, v10_1.SelectMenuDefaultValueType.Role));
119
119
  return this;
120
120
  }
121
121
  /**
@@ -124,7 +124,7 @@ class RoleSelectMenu extends SelectMenu {
124
124
  * @returns The current RoleSelectMenu instance.
125
125
  */
126
126
  setDefaultRoles(...roles) {
127
- this.data.default_values = mappedDefault(roles, common_1.SelectMenuDefaultValueType.Role);
127
+ this.data.default_values = mappedDefault(roles, v10_1.SelectMenuDefaultValueType.Role);
128
128
  return this;
129
129
  }
130
130
  }
@@ -137,7 +137,31 @@ exports.RoleSelectMenu = RoleSelectMenu;
137
137
  */
138
138
  class MentionableSelectMenu extends SelectMenu {
139
139
  constructor(data = {}) {
140
- super({ ...data, type: common_1.ComponentType.MentionableSelect });
140
+ super({ ...data, type: v10_1.ComponentType.MentionableSelect });
141
+ }
142
+ /**
143
+ * Sets the default selected roles or users for the select menu.
144
+ * @param mentionables - Role/User id and type to be set as default.
145
+ * @returns The current MentionableSelectMenu instance.
146
+ */
147
+ setDefaultMentionables(...mentionables) {
148
+ this.data.default_values = mentionables.flat().map(mentionable => ({
149
+ id: mentionable.id,
150
+ type: v10_1.SelectMenuDefaultValueType[mentionable.type],
151
+ }));
152
+ return this;
153
+ }
154
+ /**
155
+ * Adds default selected roles or users for the select menu.
156
+ * @param mentionables - Role/User id and type to be added as default.
157
+ * @returns The current MentionableSelectMenu instance.
158
+ */
159
+ addDefaultMentionables(...mentionables) {
160
+ this.data.default_values = (this.data.default_values ?? []).concat(mentionables.flat().map(mentionable => ({
161
+ id: mentionable.id,
162
+ type: v10_1.SelectMenuDefaultValueType[mentionable.type],
163
+ })));
164
+ return this;
141
165
  }
142
166
  }
143
167
  exports.MentionableSelectMenu = MentionableSelectMenu;
@@ -151,7 +175,7 @@ exports.MentionableSelectMenu = MentionableSelectMenu;
151
175
  */
152
176
  class ChannelSelectMenu extends SelectMenu {
153
177
  constructor(data = {}) {
154
- super({ ...data, type: common_1.ComponentType.ChannelSelect });
178
+ super({ ...data, type: v10_1.ComponentType.ChannelSelect });
155
179
  }
156
180
  /**
157
181
  * Adds default selected channels to the select menu.
@@ -159,7 +183,7 @@ class ChannelSelectMenu extends SelectMenu {
159
183
  * @returns The current ChannelSelectMenu instance.
160
184
  */
161
185
  addDefaultChannels(...channels) {
162
- this.data.default_values = (this.data.default_values ?? []).concat(mappedDefault(channels, common_1.SelectMenuDefaultValueType.Channel));
186
+ this.data.default_values = (this.data.default_values ?? []).concat(mappedDefault(channels, v10_1.SelectMenuDefaultValueType.Channel));
163
187
  return this;
164
188
  }
165
189
  /**
@@ -168,7 +192,7 @@ class ChannelSelectMenu extends SelectMenu {
168
192
  * @returns The current ChannelSelectMenu instance.
169
193
  */
170
194
  setDefaultChannels(...channels) {
171
- this.data.default_values = mappedDefault(channels, common_1.SelectMenuDefaultValueType.Channel);
195
+ this.data.default_values = mappedDefault(channels, v10_1.SelectMenuDefaultValueType.Channel);
172
196
  return this;
173
197
  }
174
198
  /**
@@ -195,7 +219,7 @@ exports.ChannelSelectMenu = ChannelSelectMenu;
195
219
  */
196
220
  class StringSelectMenu extends SelectMenu {
197
221
  constructor(data = {}) {
198
- super({ ...data, type: common_1.ComponentType.StringSelect });
222
+ super({ ...data, type: v10_1.ComponentType.StringSelect });
199
223
  this.data.options = (data.options ?? []).map(x => new StringSelectOption(x));
200
224
  }
201
225
  /**
@@ -1,4 +1,4 @@
1
- import { type APIActionRowComponent, type APIActionRowComponentTypes } from '../common';
1
+ import { type APIActionRowComponent, type APIActionRowComponentTypes } from 'discord-api-types/v10';
2
2
  import { ActionRow } from './ActionRow';
3
3
  import type { BuilderComponents } from './types';
4
4
  export * from './ActionRow';
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.fromComponent = void 0;
18
- const common_1 = require("../common");
18
+ const v10_1 = require("discord-api-types/v10");
19
19
  const ActionRow_1 = require("./ActionRow");
20
20
  const Button_1 = require("./Button");
21
21
  const Modal_1 = require("./Modal");
@@ -33,21 +33,21 @@ function fromComponent(data) {
33
33
  return data;
34
34
  }
35
35
  switch (data.type) {
36
- case common_1.ComponentType.Button:
36
+ case v10_1.ComponentType.Button:
37
37
  return new Button_1.Button(data);
38
- case common_1.ComponentType.StringSelect:
38
+ case v10_1.ComponentType.StringSelect:
39
39
  return new SelectMenu_1.StringSelectMenu(data);
40
- case common_1.ComponentType.TextInput:
40
+ case v10_1.ComponentType.TextInput:
41
41
  return new Modal_1.TextInput(data);
42
- case common_1.ComponentType.UserSelect:
42
+ case v10_1.ComponentType.UserSelect:
43
43
  return new SelectMenu_1.UserSelectMenu(data);
44
- case common_1.ComponentType.RoleSelect:
44
+ case v10_1.ComponentType.RoleSelect:
45
45
  return new SelectMenu_1.RoleSelectMenu(data);
46
- case common_1.ComponentType.MentionableSelect:
46
+ case v10_1.ComponentType.MentionableSelect:
47
47
  return new SelectMenu_1.MentionableSelectMenu(data);
48
- case common_1.ComponentType.ChannelSelect:
48
+ case v10_1.ComponentType.ChannelSelect:
49
49
  return new SelectMenu_1.ChannelSelectMenu(data);
50
- case common_1.ComponentType.ActionRow:
50
+ case v10_1.ComponentType.ActionRow:
51
51
  return new ActionRow_1.ActionRow(data);
52
52
  }
53
53
  }
@@ -2,7 +2,7 @@ import type { ComponentInteraction, ModalSubmitInteraction, StringSelectMenuInte
2
2
  import type { Button } from './Button';
3
3
  import type { TextInput } from './Modal';
4
4
  import type { BuilderSelectMenus } from './SelectMenu';
5
- export type ComponentCallback = (interaction: ComponentInteraction | StringSelectMenuInteraction, stop: ComponentStopCallback, refresh: ComponentRefreshCallback) => any;
5
+ export type ComponentCallback<T extends ComponentInteraction | StringSelectMenuInteraction = ComponentInteraction | StringSelectMenuInteraction> = (interaction: T, stop: ComponentStopCallback, refresh: ComponentRefreshCallback) => any;
6
6
  export type ComponentFilterCallback<T = ComponentInteraction> = (interaction: T) => any;
7
7
  export type ComponentStopCallback = (reason?: string, refresh?: ComponentRefreshCallback) => any;
8
8
  export type ComponentRefreshCallback = () => any;
@@ -1,4 +1,4 @@
1
- import type { GatewayDispatchPayload, If } from '../common';
1
+ import type { If } from '../common';
2
2
  import type { Adapter } from './adapters';
3
3
  import { Guilds } from './resources/guilds';
4
4
  import { Users } from './resources/users';
@@ -11,8 +11,8 @@ import { StageInstances } from './resources/stage-instances';
11
11
  import { Stickers } from './resources/stickers';
12
12
  import { Threads } from './resources/threads';
13
13
  import { VoiceStates } from './resources/voice-states';
14
+ import { type GatewayDispatchPayload, GatewayIntentBits } from 'discord-api-types/v10';
14
15
  import type { InternalOptions, UsingClient } from '../commands';
15
- import { GatewayIntentBits } from '../common';
16
16
  import { Overwrites } from './resources/overwrites';
17
17
  export type InferAsyncCache = InternalOptions extends {
18
18
  asyncCache: infer P;
@@ -65,17 +65,17 @@ export declare class Cache {
65
65
  members: import("..").GuildMember[];
66
66
  users: import("..").User[];
67
67
  threads: import("..").ThreadChannel[];
68
- presences: (Omit<import("discord-api-types/payloads/v10/gateway").GatewayPresenceUpdate, "user"> & {
68
+ presences: (Omit<import("discord-api-types/v10").GatewayPresenceUpdate, "user"> & {
69
69
  id: string;
70
70
  } & {
71
71
  guild_id: string;
72
72
  })[];
73
- voiceStates: (Omit<import("discord-api-types/payloads/v10/voice").GatewayVoiceState, "member"> & {
73
+ voiceStates: (Omit<import("discord-api-types/v10").GatewayVoiceState, "member"> & {
74
74
  guild_id: string;
75
75
  } & {
76
76
  guild_id: string;
77
77
  })[];
78
- stageInstances: (import("discord-api-types/payloads/v10/stageInstance").APIStageInstance & {
78
+ stageInstances: (import("discord-api-types/v10").APIStageInstance & {
79
79
  guild_id: string;
80
80
  })[];
81
81
  overwrites: {
@@ -26,7 +26,7 @@ const stage_instances_1 = require("./resources/stage-instances");
26
26
  const stickers_1 = require("./resources/stickers");
27
27
  const threads_1 = require("./resources/threads");
28
28
  const voice_states_1 = require("./resources/voice-states");
29
- const common_1 = require("../common");
29
+ const v10_1 = require("discord-api-types/v10");
30
30
  const overwrites_1 = require("./resources/overwrites");
31
31
  __exportStar(require("./adapters/index"), exports);
32
32
  class Cache {
@@ -109,7 +109,7 @@ class Cache {
109
109
  }
110
110
  // internal use ./structures
111
111
  hasIntent(intent) {
112
- return (this.intents & common_1.GatewayIntentBits[intent]) === common_1.GatewayIntentBits[intent];
112
+ return (this.intents & v10_1.GatewayIntentBits[intent]) === v10_1.GatewayIntentBits[intent];
113
113
  }
114
114
  get hasGuildsIntent() {
115
115
  return this.hasIntent('Guilds');
@@ -340,7 +340,7 @@ class Cache {
340
340
  await this.overwrites?.set(event.d.id, event.d.guild_id, event.d.permission_overwrites);
341
341
  break;
342
342
  }
343
- if (event.d.type === common_1.ChannelType.DM) {
343
+ if (event.d.type === v10_1.ChannelType.DM) {
344
344
  await this.channels?.set(event.d.recipients[0]?.id, '@me', event.d);
345
345
  break;
346
346
  }
@@ -1,6 +1,6 @@
1
+ import type { GatewayIntentBits } from 'discord-api-types/v10';
1
2
  import type { BaseClient } from '../../../client/base';
2
3
  import type { UsingClient } from '../../../commands';
3
- import { type GatewayIntentBits } from '../../../common';
4
4
  import type { Cache, ReturnCache } from '../../index';
5
5
  export declare class BaseResource<T = any> {
6
6
  protected cache: Cache;
@@ -1,6 +1,6 @@
1
+ import type { GatewayIntentBits } from 'discord-api-types/v10';
1
2
  import type { BaseClient } from '../../../client/base';
2
3
  import type { UsingClient } from '../../../commands';
3
- import { type GatewayIntentBits } from '../../../common';
4
4
  import type { Cache, ReturnCache } from '../../index';
5
5
  export declare class GuildBasedResource<T = any> {
6
6
  protected cache: Cache;
@@ -1,6 +1,6 @@
1
+ import type { GatewayIntentBits } from 'discord-api-types/v10';
1
2
  import type { BaseClient } from '../../../client/base';
2
3
  import type { UsingClient } from '../../../commands';
3
- import { type GatewayIntentBits } from '../../../common';
4
4
  import type { Cache, ReturnCache } from '../../index';
5
5
  export declare class GuildRelatedResource<T = any> {
6
6
  protected cache: Cache;
@@ -1,4 +1,4 @@
1
- import type { GatewayPresenceUpdate } from '../../common';
1
+ import type { GatewayPresenceUpdate } from 'discord-api-types/v10';
2
2
  import { GuildRelatedResource } from './default/guild-related';
3
3
  export declare class Presences extends GuildRelatedResource<PresenceResource> {
4
4
  namespace: string;
@@ -1,4 +1,4 @@
1
- import type { APIStageInstance } from '../../common';
1
+ import type { APIStageInstance } from 'discord-api-types/v10';
2
2
  import { GuildRelatedResource } from './default/guild-related';
3
3
  export declare class StageInstances extends GuildRelatedResource<APIStageInstance> {
4
4
  namespace: string;
@@ -1,4 +1,4 @@
1
- import type { GatewayVoiceState } from '../../common';
1
+ import type { GatewayVoiceState } from 'discord-api-types/v10';
2
2
  import { GuildBasedResource } from './default/guild-based';
3
3
  export declare class VoiceStates extends GuildBasedResource<VoiceStateResource> {
4
4
  namespace: string;