@discordjs/core 1.2.0-dev.1714263069-798f28cb9 → 1.2.0-dev.1714522226-a1aeaeb9d

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.
@@ -1,6 +1,6 @@
1
1
  import { REST, RequestData, 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, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTGetAPIGuildResult, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, 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, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTGetAPIGuildResult, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, 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, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
4
4
  export * from 'discord-api-types/v10';
5
5
 
6
6
  declare class ApplicationCommandsAPI {
@@ -1510,6 +1510,31 @@ declare class OAuth2API {
1510
1510
  getCurrentAuthorizationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIOAuth2CurrentAuthorizationResult>;
1511
1511
  }
1512
1512
 
1513
+ declare class PollAPI {
1514
+ private readonly rest;
1515
+ constructor(rest: REST);
1516
+ /**
1517
+ * Gets the list of users that voted for a specific answer in a poll
1518
+ *
1519
+ * @see {@link https://discord.com/developers/docs/resources/poll#get-answer-voters}
1520
+ * @param channelId - The id of the channel containing the message
1521
+ * @param messageId - The id of the message containing the poll
1522
+ * @param answerId - The id of the answer to get voters for
1523
+ * @param query - The query for getting the list of voters
1524
+ * @param options - The options for getting the list of voters
1525
+ */
1526
+ getAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number, query: RESTGetAPIPollAnswerVotersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIPollAnswerVotersResult>;
1527
+ /**
1528
+ * Immediately expires (i.e. ends) a poll
1529
+ *
1530
+ * @see {@link https://discord.com/developers/docs/resources/poll#expire-poll}
1531
+ * @param channelId - The id of the channel containing the message
1532
+ * @param messageId - The id of the message containing the poll
1533
+ * @param options - The options for expiring the poll
1534
+ */
1535
+ expirePoll(channelId: Snowflake, messageId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1536
+ }
1537
+
1513
1538
  declare class RoleConnectionsAPI {
1514
1539
  private readonly rest;
1515
1540
  constructor(rest: REST);
@@ -1769,6 +1794,7 @@ declare class API {
1769
1794
  readonly invites: InvitesAPI;
1770
1795
  readonly monetization: MonetizationAPI;
1771
1796
  readonly oauth2: OAuth2API;
1797
+ readonly poll: PollAPI;
1772
1798
  readonly roleConnections: RoleConnectionsAPI;
1773
1799
  readonly stageInstances: StageInstancesAPI;
1774
1800
  readonly stickers: StickersAPI;
@@ -1816,4 +1842,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
1816
1842
  */
1817
1843
  declare const version: string;
1818
1844
 
1819
- export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, RoleConnectionsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
1845
+ export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
@@ -1,6 +1,6 @@
1
1
  import { REST, RequestData, 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, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTGetAPIGuildResult, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, 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, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTGetAPIGuildResult, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, 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, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
4
4
  export * from 'discord-api-types/v10';
5
5
 
6
6
  declare class ApplicationCommandsAPI {
@@ -1510,6 +1510,31 @@ declare class OAuth2API {
1510
1510
  getCurrentAuthorizationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIOAuth2CurrentAuthorizationResult>;
1511
1511
  }
1512
1512
 
1513
+ declare class PollAPI {
1514
+ private readonly rest;
1515
+ constructor(rest: REST);
1516
+ /**
1517
+ * Gets the list of users that voted for a specific answer in a poll
1518
+ *
1519
+ * @see {@link https://discord.com/developers/docs/resources/poll#get-answer-voters}
1520
+ * @param channelId - The id of the channel containing the message
1521
+ * @param messageId - The id of the message containing the poll
1522
+ * @param answerId - The id of the answer to get voters for
1523
+ * @param query - The query for getting the list of voters
1524
+ * @param options - The options for getting the list of voters
1525
+ */
1526
+ getAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number, query: RESTGetAPIPollAnswerVotersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIPollAnswerVotersResult>;
1527
+ /**
1528
+ * Immediately expires (i.e. ends) a poll
1529
+ *
1530
+ * @see {@link https://discord.com/developers/docs/resources/poll#expire-poll}
1531
+ * @param channelId - The id of the channel containing the message
1532
+ * @param messageId - The id of the message containing the poll
1533
+ * @param options - The options for expiring the poll
1534
+ */
1535
+ expirePoll(channelId: Snowflake, messageId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1536
+ }
1537
+
1513
1538
  declare class RoleConnectionsAPI {
1514
1539
  private readonly rest;
1515
1540
  constructor(rest: REST);
@@ -1769,6 +1794,7 @@ declare class API {
1769
1794
  readonly invites: InvitesAPI;
1770
1795
  readonly monetization: MonetizationAPI;
1771
1796
  readonly oauth2: OAuth2API;
1797
+ readonly poll: PollAPI;
1772
1798
  readonly roleConnections: RoleConnectionsAPI;
1773
1799
  readonly stageInstances: StageInstancesAPI;
1774
1800
  readonly stickers: StickersAPI;
@@ -1816,4 +1842,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
1816
1842
  */
1817
1843
  declare const version: string;
1818
1844
 
1819
- export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, RoleConnectionsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
1845
+ export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
package/dist/http-only.js CHANGED
@@ -31,6 +31,7 @@ __export(http_only_exports, {
31
31
  InvitesAPI: () => InvitesAPI,
32
32
  MonetizationAPI: () => MonetizationAPI,
33
33
  OAuth2API: () => OAuth2API,
34
+ PollAPI: () => PollAPI,
34
35
  RoleConnectionsAPI: () => RoleConnectionsAPI,
35
36
  StageInstancesAPI: () => StageInstancesAPI,
36
37
  StickersAPI: () => StickersAPI,
@@ -2052,8 +2053,49 @@ var OAuth2API = class {
2052
2053
  }
2053
2054
  };
2054
2055
 
2055
- // src/api/roleConnections.ts
2056
+ // src/api/poll.ts
2057
+ var import_rest7 = require("@discordjs/rest");
2056
2058
  var import_v109 = require("discord-api-types/v10");
2059
+ var PollAPI = class {
2060
+ constructor(rest) {
2061
+ this.rest = rest;
2062
+ }
2063
+ static {
2064
+ __name(this, "PollAPI");
2065
+ }
2066
+ /**
2067
+ * Gets the list of users that voted for a specific answer in a poll
2068
+ *
2069
+ * @see {@link https://discord.com/developers/docs/resources/poll#get-answer-voters}
2070
+ * @param channelId - The id of the channel containing the message
2071
+ * @param messageId - The id of the message containing the poll
2072
+ * @param answerId - The id of the answer to get voters for
2073
+ * @param query - The query for getting the list of voters
2074
+ * @param options - The options for getting the list of voters
2075
+ */
2076
+ async getAnswerVoters(channelId, messageId, answerId, query, { signal } = {}) {
2077
+ return this.rest.get(import_v109.Routes.pollAnswerVoters(channelId, messageId, answerId), {
2078
+ signal,
2079
+ query: (0, import_rest7.makeURLSearchParams)(query)
2080
+ });
2081
+ }
2082
+ /**
2083
+ * Immediately expires (i.e. ends) a poll
2084
+ *
2085
+ * @see {@link https://discord.com/developers/docs/resources/poll#expire-poll}
2086
+ * @param channelId - The id of the channel containing the message
2087
+ * @param messageId - The id of the message containing the poll
2088
+ * @param options - The options for expiring the poll
2089
+ */
2090
+ async expirePoll(channelId, messageId, { signal } = {}) {
2091
+ return this.rest.post(import_v109.Routes.expirePoll(channelId, messageId), {
2092
+ signal
2093
+ });
2094
+ }
2095
+ };
2096
+
2097
+ // src/api/roleConnections.ts
2098
+ var import_v1010 = require("discord-api-types/v10");
2057
2099
  var RoleConnectionsAPI = class {
2058
2100
  constructor(rest) {
2059
2101
  this.rest = rest;
@@ -2069,7 +2111,7 @@ var RoleConnectionsAPI = class {
2069
2111
  * @param options - The options for fetching the role connection metadata records
2070
2112
  */
2071
2113
  async getMetadataRecords(applicationId, { signal } = {}) {
2072
- return this.rest.get(import_v109.Routes.applicationRoleConnectionMetadata(applicationId), {
2114
+ return this.rest.get(import_v1010.Routes.applicationRoleConnectionMetadata(applicationId), {
2073
2115
  signal
2074
2116
  });
2075
2117
  }
@@ -2082,7 +2124,7 @@ var RoleConnectionsAPI = class {
2082
2124
  * @param options - The options for updating the role connection metadata records
2083
2125
  */
2084
2126
  async updateMetadataRecords(applicationId, body, { signal } = {}) {
2085
- return this.rest.put(import_v109.Routes.applicationRoleConnectionMetadata(applicationId), {
2127
+ return this.rest.put(import_v1010.Routes.applicationRoleConnectionMetadata(applicationId), {
2086
2128
  body,
2087
2129
  signal
2088
2130
  });
@@ -2090,7 +2132,7 @@ var RoleConnectionsAPI = class {
2090
2132
  };
2091
2133
 
2092
2134
  // src/api/stageInstances.ts
2093
- var import_v1010 = require("discord-api-types/v10");
2135
+ var import_v1011 = require("discord-api-types/v10");
2094
2136
  var StageInstancesAPI = class {
2095
2137
  constructor(rest) {
2096
2138
  this.rest = rest;
@@ -2106,7 +2148,7 @@ var StageInstancesAPI = class {
2106
2148
  * @param options - The options for creating the new stage instance
2107
2149
  */
2108
2150
  async create(body, { reason, signal } = {}) {
2109
- return this.rest.post(import_v1010.Routes.stageInstances(), {
2151
+ return this.rest.post(import_v1011.Routes.stageInstances(), {
2110
2152
  body,
2111
2153
  reason,
2112
2154
  signal
@@ -2120,7 +2162,7 @@ var StageInstancesAPI = class {
2120
2162
  * @param options - The options for fetching the stage instance
2121
2163
  */
2122
2164
  async get(channelId, { signal } = {}) {
2123
- return this.rest.get(import_v1010.Routes.stageInstance(channelId), { signal });
2165
+ return this.rest.get(import_v1011.Routes.stageInstance(channelId), { signal });
2124
2166
  }
2125
2167
  /**
2126
2168
  * Edits a stage instance
@@ -2131,7 +2173,7 @@ var StageInstancesAPI = class {
2131
2173
  * @param options - The options for editing the stage instance
2132
2174
  */
2133
2175
  async edit(channelId, body, { reason, signal } = {}) {
2134
- return this.rest.patch(import_v1010.Routes.stageInstance(channelId), {
2176
+ return this.rest.patch(import_v1011.Routes.stageInstance(channelId), {
2135
2177
  body,
2136
2178
  reason,
2137
2179
  signal
@@ -2145,12 +2187,12 @@ var StageInstancesAPI = class {
2145
2187
  * @param options - The options for deleting the stage instance
2146
2188
  */
2147
2189
  async delete(channelId, { reason, signal } = {}) {
2148
- await this.rest.delete(import_v1010.Routes.stageInstance(channelId), { reason, signal });
2190
+ await this.rest.delete(import_v1011.Routes.stageInstance(channelId), { reason, signal });
2149
2191
  }
2150
2192
  };
2151
2193
 
2152
2194
  // src/api/sticker.ts
2153
- var import_v1011 = require("discord-api-types/v10");
2195
+ var import_v1012 = require("discord-api-types/v10");
2154
2196
  var StickersAPI = class {
2155
2197
  constructor(rest) {
2156
2198
  this.rest = rest;
@@ -2165,7 +2207,7 @@ var StickersAPI = class {
2165
2207
  * @param options - The options for fetching the sticker packs
2166
2208
  */
2167
2209
  async getStickers({ signal } = {}) {
2168
- return this.rest.get(import_v1011.Routes.stickerPacks(), { signal });
2210
+ return this.rest.get(import_v1012.Routes.stickerPacks(), { signal });
2169
2211
  }
2170
2212
  /**
2171
2213
  * Fetches all of the sticker packs
@@ -2185,12 +2227,12 @@ var StickersAPI = class {
2185
2227
  * @param options - The options for fetching the sticker
2186
2228
  */
2187
2229
  async get(stickerId, { signal } = {}) {
2188
- return this.rest.get(import_v1011.Routes.sticker(stickerId), { signal });
2230
+ return this.rest.get(import_v1012.Routes.sticker(stickerId), { signal });
2189
2231
  }
2190
2232
  };
2191
2233
 
2192
2234
  // src/api/thread.ts
2193
- var import_v1012 = require("discord-api-types/v10");
2235
+ var import_v1013 = require("discord-api-types/v10");
2194
2236
  var ThreadsAPI = class {
2195
2237
  constructor(rest) {
2196
2238
  this.rest = rest;
@@ -2206,7 +2248,7 @@ var ThreadsAPI = class {
2206
2248
  * @param options - The options for joining the thread
2207
2249
  */
2208
2250
  async join(threadId, { signal } = {}) {
2209
- await this.rest.put(import_v1012.Routes.threadMembers(threadId, "@me"), { signal });
2251
+ await this.rest.put(import_v1013.Routes.threadMembers(threadId, "@me"), { signal });
2210
2252
  }
2211
2253
  /**
2212
2254
  * Adds a member to a thread
@@ -2217,7 +2259,7 @@ var ThreadsAPI = class {
2217
2259
  * @param options - The options for adding the member to the thread
2218
2260
  */
2219
2261
  async addMember(threadId, userId, { signal } = {}) {
2220
- await this.rest.put(import_v1012.Routes.threadMembers(threadId, userId), { signal });
2262
+ await this.rest.put(import_v1013.Routes.threadMembers(threadId, userId), { signal });
2221
2263
  }
2222
2264
  /**
2223
2265
  * Removes the current user from a thread
@@ -2227,7 +2269,7 @@ var ThreadsAPI = class {
2227
2269
  * @param options - The options for leaving the thread
2228
2270
  */
2229
2271
  async leave(threadId, { signal } = {}) {
2230
- await this.rest.delete(import_v1012.Routes.threadMembers(threadId, "@me"), { signal });
2272
+ await this.rest.delete(import_v1013.Routes.threadMembers(threadId, "@me"), { signal });
2231
2273
  }
2232
2274
  /**
2233
2275
  * Removes a member from a thread
@@ -2238,7 +2280,7 @@ var ThreadsAPI = class {
2238
2280
  * @param options - The options for removing the member from the thread
2239
2281
  */
2240
2282
  async removeMember(threadId, userId, { signal } = {}) {
2241
- await this.rest.delete(import_v1012.Routes.threadMembers(threadId, userId), { signal });
2283
+ await this.rest.delete(import_v1013.Routes.threadMembers(threadId, userId), { signal });
2242
2284
  }
2243
2285
  /**
2244
2286
  * Fetches a member of a thread
@@ -2249,7 +2291,7 @@ var ThreadsAPI = class {
2249
2291
  * @param options - The options for fetching the member
2250
2292
  */
2251
2293
  async getMember(threadId, userId, { signal } = {}) {
2252
- return this.rest.get(import_v1012.Routes.threadMembers(threadId, userId), { signal });
2294
+ return this.rest.get(import_v1013.Routes.threadMembers(threadId, userId), { signal });
2253
2295
  }
2254
2296
  /**
2255
2297
  * Fetches all members of a thread
@@ -2259,13 +2301,13 @@ var ThreadsAPI = class {
2259
2301
  * @param options - The options for fetching the members
2260
2302
  */
2261
2303
  async getAllMembers(threadId, { signal } = {}) {
2262
- return this.rest.get(import_v1012.Routes.threadMembers(threadId), { signal });
2304
+ return this.rest.get(import_v1013.Routes.threadMembers(threadId), { signal });
2263
2305
  }
2264
2306
  };
2265
2307
 
2266
2308
  // src/api/user.ts
2267
- var import_rest7 = require("@discordjs/rest");
2268
- var import_v1013 = require("discord-api-types/v10");
2309
+ var import_rest8 = require("@discordjs/rest");
2310
+ var import_v1014 = require("discord-api-types/v10");
2269
2311
  var UsersAPI = class {
2270
2312
  constructor(rest) {
2271
2313
  this.rest = rest;
@@ -2281,7 +2323,7 @@ var UsersAPI = class {
2281
2323
  * @param options - The options for fetching the user
2282
2324
  */
2283
2325
  async get(userId, { signal } = {}) {
2284
- return this.rest.get(import_v1013.Routes.user(userId), { signal });
2326
+ return this.rest.get(import_v1014.Routes.user(userId), { signal });
2285
2327
  }
2286
2328
  /**
2287
2329
  * Returns the user object of the requester's account
@@ -2290,7 +2332,7 @@ var UsersAPI = class {
2290
2332
  * @param options - The options for fetching the current user
2291
2333
  */
2292
2334
  async getCurrent({ signal } = {}) {
2293
- return this.rest.get(import_v1013.Routes.user("@me"), { signal });
2335
+ return this.rest.get(import_v1014.Routes.user("@me"), { signal });
2294
2336
  }
2295
2337
  /**
2296
2338
  * Returns a list of partial guild objects the current user is a member of
@@ -2300,8 +2342,8 @@ var UsersAPI = class {
2300
2342
  * @param options - The options for fetching the guilds
2301
2343
  */
2302
2344
  async getGuilds(query = {}, { signal } = {}) {
2303
- return this.rest.get(import_v1013.Routes.userGuilds(), {
2304
- query: (0, import_rest7.makeURLSearchParams)(query),
2345
+ return this.rest.get(import_v1014.Routes.userGuilds(), {
2346
+ query: (0, import_rest8.makeURLSearchParams)(query),
2305
2347
  signal
2306
2348
  });
2307
2349
  }
@@ -2313,7 +2355,7 @@ var UsersAPI = class {
2313
2355
  * @param options - The options for leaving the guild
2314
2356
  */
2315
2357
  async leaveGuild(guildId, { signal } = {}) {
2316
- await this.rest.delete(import_v1013.Routes.userGuild(guildId), { signal });
2358
+ await this.rest.delete(import_v1014.Routes.userGuild(guildId), { signal });
2317
2359
  }
2318
2360
  /**
2319
2361
  * Edits the current user
@@ -2323,7 +2365,7 @@ var UsersAPI = class {
2323
2365
  * @param options - The options for editing the user
2324
2366
  */
2325
2367
  async edit(body, { signal } = {}) {
2326
- return this.rest.patch(import_v1013.Routes.user("@me"), { body, signal });
2368
+ return this.rest.patch(import_v1014.Routes.user("@me"), { body, signal });
2327
2369
  }
2328
2370
  /**
2329
2371
  * Fetches the guild member for the current user
@@ -2333,7 +2375,7 @@ var UsersAPI = class {
2333
2375
  * @param options - The options for fetching the guild member
2334
2376
  */
2335
2377
  async getGuildMember(guildId, { signal } = {}) {
2336
- return this.rest.get(import_v1013.Routes.userGuildMember(guildId), { signal });
2378
+ return this.rest.get(import_v1014.Routes.userGuildMember(guildId), { signal });
2337
2379
  }
2338
2380
  /**
2339
2381
  * Edits the guild member for the current user
@@ -2344,7 +2386,7 @@ var UsersAPI = class {
2344
2386
  * @param options - The options for editing the guild member
2345
2387
  */
2346
2388
  async editCurrentGuildMember(guildId, body = {}, { reason, signal } = {}) {
2347
- return this.rest.patch(import_v1013.Routes.guildMember(guildId, "@me"), {
2389
+ return this.rest.patch(import_v1014.Routes.guildMember(guildId, "@me"), {
2348
2390
  reason,
2349
2391
  body,
2350
2392
  signal
@@ -2358,7 +2400,7 @@ var UsersAPI = class {
2358
2400
  * @param options - The options for opening the DM
2359
2401
  */
2360
2402
  async createDM(userId, { signal } = {}) {
2361
- return this.rest.post(import_v1013.Routes.userChannels(), {
2403
+ return this.rest.post(import_v1014.Routes.userChannels(), {
2362
2404
  body: { recipient_id: userId },
2363
2405
  signal
2364
2406
  });
@@ -2370,7 +2412,7 @@ var UsersAPI = class {
2370
2412
  * @param options - The options for fetching the user's connections
2371
2413
  */
2372
2414
  async getConnections({ signal } = {}) {
2373
- return this.rest.get(import_v1013.Routes.userConnections(), { signal });
2415
+ return this.rest.get(import_v1014.Routes.userConnections(), { signal });
2374
2416
  }
2375
2417
  /**
2376
2418
  * Gets the current user's active application role connection
@@ -2380,7 +2422,7 @@ var UsersAPI = class {
2380
2422
  * @param options - The options for fetching the role connections
2381
2423
  */
2382
2424
  async getApplicationRoleConnection(applicationId, { signal } = {}) {
2383
- return this.rest.get(import_v1013.Routes.userApplicationRoleConnection(applicationId), {
2425
+ return this.rest.get(import_v1014.Routes.userApplicationRoleConnection(applicationId), {
2384
2426
  signal
2385
2427
  });
2386
2428
  }
@@ -2393,7 +2435,7 @@ var UsersAPI = class {
2393
2435
  * @param options - The options for updating the application role connection
2394
2436
  */
2395
2437
  async updateApplicationRoleConnection(applicationId, body, { signal } = {}) {
2396
- return this.rest.put(import_v1013.Routes.userApplicationRoleConnection(applicationId), {
2438
+ return this.rest.put(import_v1014.Routes.userApplicationRoleConnection(applicationId), {
2397
2439
  body,
2398
2440
  signal
2399
2441
  });
@@ -2401,7 +2443,7 @@ var UsersAPI = class {
2401
2443
  };
2402
2444
 
2403
2445
  // src/api/voice.ts
2404
- var import_v1014 = require("discord-api-types/v10");
2446
+ var import_v1015 = require("discord-api-types/v10");
2405
2447
  var VoiceAPI = class {
2406
2448
  constructor(rest) {
2407
2449
  this.rest = rest;
@@ -2416,13 +2458,13 @@ var VoiceAPI = class {
2416
2458
  * @param options - The options for fetching the voice regions
2417
2459
  */
2418
2460
  async getVoiceRegions({ signal } = {}) {
2419
- return this.rest.get(import_v1014.Routes.voiceRegions(), { signal });
2461
+ return this.rest.get(import_v1015.Routes.voiceRegions(), { signal });
2420
2462
  }
2421
2463
  };
2422
2464
 
2423
2465
  // src/api/webhook.ts
2424
- var import_rest8 = require("@discordjs/rest");
2425
- var import_v1015 = require("discord-api-types/v10");
2466
+ var import_rest9 = require("@discordjs/rest");
2467
+ var import_v1016 = require("discord-api-types/v10");
2426
2468
  var WebhooksAPI = class {
2427
2469
  constructor(rest) {
2428
2470
  this.rest = rest;
@@ -2439,7 +2481,7 @@ var WebhooksAPI = class {
2439
2481
  * @param options - The options for fetching the webhook
2440
2482
  */
2441
2483
  async get(id, { token, signal } = {}) {
2442
- return this.rest.get(import_v1015.Routes.webhook(id, token), {
2484
+ return this.rest.get(import_v1016.Routes.webhook(id, token), {
2443
2485
  signal,
2444
2486
  auth: !token
2445
2487
  });
@@ -2454,7 +2496,7 @@ var WebhooksAPI = class {
2454
2496
  * @param options - The options for editing the webhook
2455
2497
  */
2456
2498
  async edit(id, body, { token, reason, signal } = {}) {
2457
- return this.rest.patch(import_v1015.Routes.webhook(id, token), {
2499
+ return this.rest.patch(import_v1016.Routes.webhook(id, token), {
2458
2500
  reason,
2459
2501
  body,
2460
2502
  signal,
@@ -2470,7 +2512,7 @@ var WebhooksAPI = class {
2470
2512
  * @param options - The options for deleting the webhook
2471
2513
  */
2472
2514
  async delete(id, { token, reason, signal } = {}) {
2473
- await this.rest.delete(import_v1015.Routes.webhook(id, token), {
2515
+ await this.rest.delete(import_v1016.Routes.webhook(id, token), {
2474
2516
  reason,
2475
2517
  signal,
2476
2518
  auth: !token
@@ -2491,8 +2533,8 @@ var WebhooksAPI = class {
2491
2533
  files,
2492
2534
  ...body
2493
2535
  }, { signal } = {}) {
2494
- return this.rest.post(import_v1015.Routes.webhook(id, token), {
2495
- query: (0, import_rest8.makeURLSearchParams)({ wait, thread_id }),
2536
+ return this.rest.post(import_v1016.Routes.webhook(id, token), {
2537
+ query: (0, import_rest9.makeURLSearchParams)({ wait, thread_id }),
2496
2538
  files,
2497
2539
  body,
2498
2540
  auth: false,
@@ -2511,8 +2553,8 @@ var WebhooksAPI = class {
2511
2553
  * @param options - The options for executing the webhook
2512
2554
  */
2513
2555
  async executeSlack(id, token, body, query = {}, { signal } = {}) {
2514
- await this.rest.post(import_v1015.Routes.webhookPlatform(id, token, "slack"), {
2515
- query: (0, import_rest8.makeURLSearchParams)(query),
2556
+ await this.rest.post(import_v1016.Routes.webhookPlatform(id, token, "slack"), {
2557
+ query: (0, import_rest9.makeURLSearchParams)(query),
2516
2558
  body,
2517
2559
  auth: false,
2518
2560
  signal
@@ -2529,8 +2571,8 @@ var WebhooksAPI = class {
2529
2571
  * @param options - The options for executing the webhook
2530
2572
  */
2531
2573
  async executeGitHub(id, token, body, query = {}, { signal } = {}) {
2532
- await this.rest.post(import_v1015.Routes.webhookPlatform(id, token, "github"), {
2533
- query: (0, import_rest8.makeURLSearchParams)(query),
2574
+ await this.rest.post(import_v1016.Routes.webhookPlatform(id, token, "github"), {
2575
+ query: (0, import_rest9.makeURLSearchParams)(query),
2534
2576
  body,
2535
2577
  signal,
2536
2578
  auth: false
@@ -2547,8 +2589,8 @@ var WebhooksAPI = class {
2547
2589
  * @param options - The options for fetching the message
2548
2590
  */
2549
2591
  async getMessage(id, token, messageId, query = {}, { signal } = {}) {
2550
- return this.rest.get(import_v1015.Routes.webhookMessage(id, token, messageId), {
2551
- query: (0, import_rest8.makeURLSearchParams)(query),
2592
+ return this.rest.get(import_v1016.Routes.webhookMessage(id, token, messageId), {
2593
+ query: (0, import_rest9.makeURLSearchParams)(query),
2552
2594
  auth: false,
2553
2595
  signal
2554
2596
  });
@@ -2568,8 +2610,8 @@ var WebhooksAPI = class {
2568
2610
  files,
2569
2611
  ...body
2570
2612
  }, { signal } = {}) {
2571
- return this.rest.patch(import_v1015.Routes.webhookMessage(id, token, messageId), {
2572
- query: (0, import_rest8.makeURLSearchParams)({ thread_id }),
2613
+ return this.rest.patch(import_v1016.Routes.webhookMessage(id, token, messageId), {
2614
+ query: (0, import_rest9.makeURLSearchParams)({ thread_id }),
2573
2615
  auth: false,
2574
2616
  body,
2575
2617
  signal,
@@ -2587,8 +2629,8 @@ var WebhooksAPI = class {
2587
2629
  * @param options - The options for deleting the message
2588
2630
  */
2589
2631
  async deleteMessage(id, token, messageId, query = {}, { signal } = {}) {
2590
- await this.rest.delete(import_v1015.Routes.webhookMessage(id, token, messageId), {
2591
- query: (0, import_rest8.makeURLSearchParams)(query),
2632
+ await this.rest.delete(import_v1016.Routes.webhookMessage(id, token, messageId), {
2633
+ query: (0, import_rest9.makeURLSearchParams)(query),
2592
2634
  auth: false,
2593
2635
  signal
2594
2636
  });
@@ -2605,8 +2647,9 @@ var API = class {
2605
2647
  this.guilds = new GuildsAPI(rest);
2606
2648
  this.invites = new InvitesAPI(rest);
2607
2649
  this.monetization = new MonetizationAPI(rest);
2608
- this.roleConnections = new RoleConnectionsAPI(rest);
2609
2650
  this.oauth2 = new OAuth2API(rest);
2651
+ this.poll = new PollAPI(rest);
2652
+ this.roleConnections = new RoleConnectionsAPI(rest);
2610
2653
  this.stageInstances = new StageInstancesAPI(rest);
2611
2654
  this.stickers = new StickersAPI(rest);
2612
2655
  this.threads = new ThreadsAPI(rest);
@@ -2626,6 +2669,7 @@ var API = class {
2626
2669
  invites;
2627
2670
  monetization;
2628
2671
  oauth2;
2672
+ poll;
2629
2673
  roleConnections;
2630
2674
  stageInstances;
2631
2675
  stickers;
@@ -2654,7 +2698,7 @@ __name(withFiles, "withFiles");
2654
2698
 
2655
2699
  // src/http-only/index.ts
2656
2700
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
2657
- var version = "1.2.0-dev.1714263069-798f28cb9";
2701
+ var version = "1.2.0-dev.1714522226-a1aeaeb9d";
2658
2702
  // Annotate the CommonJS export names for ESM import in node:
2659
2703
  0 && (module.exports = {
2660
2704
  API,
@@ -2666,6 +2710,7 @@ var version = "1.2.0-dev.1714263069-798f28cb9";
2666
2710
  InvitesAPI,
2667
2711
  MonetizationAPI,
2668
2712
  OAuth2API,
2713
+ PollAPI,
2669
2714
  RoleConnectionsAPI,
2670
2715
  StageInstancesAPI,
2671
2716
  StickersAPI,