@buape/carbon 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +8 -7
- package/dist/src/abstracts/AnySelectMenu.d.ts +4 -3
- package/dist/src/abstracts/AnySelectMenu.d.ts.map +1 -1
- package/dist/src/abstracts/AnySelectMenu.js +8 -2
- package/dist/src/abstracts/AnySelectMenu.js.map +1 -1
- package/dist/src/abstracts/AnySelectMenuInteraction.d.ts +0 -1
- package/dist/src/abstracts/AnySelectMenuInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/AnySelectMenuInteraction.js +0 -2
- package/dist/src/abstracts/AnySelectMenuInteraction.js.map +1 -1
- package/dist/src/abstracts/BaseChannel.d.ts +12 -3
- package/dist/src/abstracts/BaseChannel.d.ts.map +1 -1
- package/dist/src/abstracts/BaseChannel.js +15 -1
- package/dist/src/abstracts/BaseChannel.js.map +1 -1
- package/dist/src/abstracts/BaseCommand.d.ts +18 -8
- package/dist/src/abstracts/BaseCommand.d.ts.map +1 -1
- package/dist/src/abstracts/BaseCommand.js +24 -7
- package/dist/src/abstracts/BaseCommand.js.map +1 -1
- package/dist/src/abstracts/BaseComponent.d.ts +10 -24
- package/dist/src/abstracts/BaseComponent.d.ts.map +1 -1
- package/dist/src/abstracts/BaseComponent.js +5 -25
- package/dist/src/abstracts/BaseComponent.js.map +1 -1
- package/dist/src/abstracts/BaseComponentInteraction.d.ts +3 -4
- package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/BaseComponentInteraction.js +3 -6
- package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -1
- package/dist/src/abstracts/BaseGuildChannel.d.ts +4 -3
- package/dist/src/abstracts/BaseGuildChannel.d.ts.map +1 -1
- package/dist/src/abstracts/BaseGuildChannel.js +5 -3
- package/dist/src/abstracts/BaseGuildChannel.js.map +1 -1
- package/dist/src/abstracts/BaseGuildTextChannel.d.ts +1 -1
- package/dist/src/abstracts/BaseGuildTextChannel.d.ts.map +1 -1
- package/dist/src/abstracts/BaseInteraction.d.ts +49 -36
- package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/BaseInteraction.js +105 -34
- package/dist/src/abstracts/BaseInteraction.js.map +1 -1
- package/dist/src/abstracts/BaseListener.d.ts +13 -0
- package/dist/src/abstracts/BaseListener.d.ts.map +1 -0
- package/dist/src/abstracts/BaseListener.js +8 -0
- package/dist/src/abstracts/BaseListener.js.map +1 -0
- package/dist/src/abstracts/BaseMessageInteractiveComponent.d.ts +39 -0
- package/dist/src/abstracts/BaseMessageInteractiveComponent.d.ts.map +1 -0
- package/dist/src/abstracts/BaseMessageInteractiveComponent.js +33 -0
- package/dist/src/abstracts/BaseMessageInteractiveComponent.js.map +1 -0
- package/dist/src/abstracts/BaseModalComponent.d.ts +29 -0
- package/dist/src/abstracts/BaseModalComponent.d.ts.map +1 -0
- package/dist/src/abstracts/BaseModalComponent.js +33 -0
- package/dist/src/abstracts/BaseModalComponent.js.map +1 -0
- package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts +5 -4
- package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts.map +1 -1
- package/dist/src/abstracts/GuildThreadOnlyChannel.js +1 -1
- package/dist/src/abstracts/GuildThreadOnlyChannel.js.map +1 -1
- package/dist/src/abstracts/Plugin.d.ts +6 -2
- package/dist/src/abstracts/Plugin.d.ts.map +1 -1
- package/dist/src/abstracts/Plugin.js.map +1 -1
- package/dist/src/classes/Client.d.ts +42 -12
- package/dist/src/classes/Client.d.ts.map +1 -1
- package/dist/src/classes/Client.js +98 -25
- package/dist/src/classes/Client.js.map +1 -1
- package/dist/src/classes/Command.d.ts +10 -2
- package/dist/src/classes/Command.d.ts.map +1 -1
- package/dist/src/classes/Command.js +12 -1
- package/dist/src/classes/Command.js.map +1 -1
- package/dist/src/classes/Listener.d.ts +376 -5
- package/dist/src/classes/Listener.d.ts.map +1 -1
- package/dist/src/classes/Listener.js +1011 -1
- package/dist/src/classes/Listener.js.map +1 -1
- package/dist/src/classes/Modal.d.ts +22 -5
- package/dist/src/classes/Modal.d.ts.map +1 -1
- package/dist/src/classes/Modal.js +14 -0
- package/dist/src/classes/Modal.js.map +1 -1
- package/dist/src/classes/RequestClient.d.ts +79 -0
- package/dist/src/classes/RequestClient.d.ts.map +1 -0
- package/dist/src/classes/RequestClient.js +225 -0
- package/dist/src/classes/RequestClient.js.map +1 -0
- package/dist/src/classes/{Button.d.ts → components/Button.d.ts} +8 -5
- package/dist/src/classes/components/Button.d.ts.map +1 -0
- package/dist/src/classes/{Button.js → components/Button.js} +13 -3
- package/dist/src/classes/components/Button.js.map +1 -0
- package/dist/src/classes/{ChannelSelectMenu.d.ts → components/ChannelSelectMenu.d.ts} +6 -4
- package/dist/src/classes/components/ChannelSelectMenu.d.ts.map +1 -0
- package/dist/src/classes/{ChannelSelectMenu.js → components/ChannelSelectMenu.js} +8 -1
- package/dist/src/classes/components/ChannelSelectMenu.js.map +1 -0
- package/dist/src/classes/components/Container.d.ts +23 -0
- package/dist/src/classes/components/Container.d.ts.map +1 -0
- package/dist/src/classes/components/Container.js +27 -0
- package/dist/src/classes/components/Container.js.map +1 -0
- package/dist/src/classes/components/File.d.ts +21 -0
- package/dist/src/classes/components/File.d.ts.map +1 -0
- package/dist/src/classes/components/File.js +33 -0
- package/dist/src/classes/components/File.js.map +1 -0
- package/dist/src/classes/components/MediaGallery.d.ts +27 -0
- package/dist/src/classes/components/MediaGallery.d.ts.map +1 -0
- package/dist/src/classes/components/MediaGallery.js +27 -0
- package/dist/src/classes/components/MediaGallery.js.map +1 -0
- package/dist/src/classes/{MentionableSelectMenu.d.ts → components/MentionableSelectMenu.d.ts} +6 -4
- package/dist/src/classes/components/MentionableSelectMenu.d.ts.map +1 -0
- package/dist/src/classes/{MentionableSelectMenu.js → components/MentionableSelectMenu.js} +8 -1
- package/dist/src/classes/components/MentionableSelectMenu.js.map +1 -0
- package/dist/src/classes/{RoleSelectMenu.d.ts → components/RoleSelectMenu.d.ts} +6 -4
- package/dist/src/classes/components/RoleSelectMenu.d.ts.map +1 -0
- package/dist/src/classes/components/RoleSelectMenu.js +20 -0
- package/dist/src/classes/components/RoleSelectMenu.js.map +1 -0
- package/dist/src/classes/components/Row.d.ts +29 -0
- package/dist/src/classes/components/Row.d.ts.map +1 -0
- package/dist/src/classes/{Row.js → components/Row.js} +8 -2
- package/dist/src/classes/components/Row.js.map +1 -0
- package/dist/src/classes/components/Section.d.ts +22 -0
- package/dist/src/classes/components/Section.d.ts.map +1 -0
- package/dist/src/classes/components/Section.js +15 -0
- package/dist/src/classes/components/Section.js.map +1 -0
- package/dist/src/classes/components/Separator.d.ts +22 -0
- package/dist/src/classes/components/Separator.d.ts.map +1 -0
- package/dist/src/classes/components/Separator.js +33 -0
- package/dist/src/classes/components/Separator.js.map +1 -0
- package/dist/src/classes/components/StringSelectMenu.d.ts +15 -0
- package/dist/src/classes/components/StringSelectMenu.d.ts.map +1 -0
- package/dist/src/classes/components/StringSelectMenu.js +19 -0
- package/dist/src/classes/components/StringSelectMenu.js.map +1 -0
- package/dist/src/classes/components/TextDisplay.d.ts +10 -0
- package/dist/src/classes/components/TextDisplay.d.ts.map +1 -0
- package/dist/src/classes/components/TextDisplay.js +19 -0
- package/dist/src/classes/components/TextDisplay.js.map +1 -0
- package/dist/src/classes/{TextInput.d.ts → components/TextInput.d.ts} +4 -3
- package/dist/src/classes/components/TextInput.d.ts.map +1 -0
- package/dist/src/classes/{TextInput.js → components/TextInput.js} +3 -2
- package/dist/src/classes/components/TextInput.js.map +1 -0
- package/dist/src/classes/components/Thumbnail.d.ts +13 -0
- package/dist/src/classes/components/Thumbnail.d.ts.map +1 -0
- package/dist/src/classes/components/Thumbnail.js +16 -0
- package/dist/src/classes/components/Thumbnail.js.map +1 -0
- package/dist/src/classes/{UserSelectMenu.d.ts → components/UserSelectMenu.d.ts} +6 -4
- package/dist/src/classes/components/UserSelectMenu.d.ts.map +1 -0
- package/dist/src/classes/components/UserSelectMenu.js +20 -0
- package/dist/src/classes/components/UserSelectMenu.js.map +1 -0
- package/dist/src/errors/BaseError.d.ts +3 -0
- package/dist/src/errors/BaseError.d.ts.map +1 -0
- package/dist/src/errors/BaseError.js +3 -0
- package/dist/src/errors/BaseError.js.map +1 -0
- package/dist/src/errors/DiscordError.d.ts +25 -0
- package/dist/src/errors/DiscordError.d.ts.map +1 -0
- package/dist/src/errors/DiscordError.js +31 -0
- package/dist/src/errors/DiscordError.js.map +1 -0
- package/dist/src/errors/RatelimitError.d.ts +15 -0
- package/dist/src/errors/RatelimitError.d.ts.map +1 -0
- package/dist/src/errors/RatelimitError.js +18 -0
- package/dist/src/errors/RatelimitError.js.map +1 -0
- package/dist/src/{factories → functions}/channelFactory.d.ts +3 -2
- package/dist/src/functions/channelFactory.d.ts.map +1 -0
- package/dist/src/functions/channelFactory.js.map +1 -0
- package/dist/src/functions/enforceChoicesLimit.d.ts +3 -0
- package/dist/src/functions/enforceChoicesLimit.d.ts.map +1 -0
- package/dist/src/functions/enforceChoicesLimit.js +17 -0
- package/dist/src/functions/enforceChoicesLimit.js.map +1 -0
- package/dist/src/functions/errorsMapper.d.ts +14 -0
- package/dist/src/functions/errorsMapper.d.ts.map +1 -0
- package/dist/src/functions/errorsMapper.js +46 -0
- package/dist/src/functions/errorsMapper.js.map +1 -0
- package/dist/src/index.d.ts +29 -63
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +31 -15
- package/dist/src/index.js.map +1 -1
- package/dist/src/internals/AutocompleteInteraction.d.ts +15 -5
- package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -1
- package/dist/src/internals/AutocompleteInteraction.js +27 -15
- package/dist/src/internals/AutocompleteInteraction.js.map +1 -1
- package/dist/src/internals/ButtonInteraction.d.ts +0 -1
- package/dist/src/internals/ButtonInteraction.d.ts.map +1 -1
- package/dist/src/internals/ButtonInteraction.js +0 -2
- package/dist/src/internals/ButtonInteraction.js.map +1 -1
- package/dist/src/internals/CommandHandler.d.ts +1 -1
- package/dist/src/internals/CommandHandler.d.ts.map +1 -1
- package/dist/src/internals/CommandHandler.js +25 -3
- package/dist/src/internals/CommandHandler.js.map +1 -1
- package/dist/src/internals/CommandInteraction.d.ts +7 -1
- package/dist/src/internals/CommandInteraction.d.ts.map +1 -1
- package/dist/src/internals/CommandInteraction.js +10 -4
- package/dist/src/internals/CommandInteraction.js.map +1 -1
- package/dist/src/internals/ComponentHandler.d.ts +8 -5
- package/dist/src/internals/ComponentHandler.d.ts.map +1 -1
- package/dist/src/internals/ComponentHandler.js +40 -16
- package/dist/src/internals/ComponentHandler.js.map +1 -1
- package/dist/src/internals/EventHandler.d.ts +7 -5
- package/dist/src/internals/EventHandler.d.ts.map +1 -1
- package/dist/src/internals/EventHandler.js +13 -11
- package/dist/src/internals/EventHandler.js.map +1 -1
- package/dist/src/internals/ModalHandler.d.ts +1 -1
- package/dist/src/internals/ModalHandler.d.ts.map +1 -1
- package/dist/src/internals/ModalHandler.js +6 -2
- package/dist/src/internals/ModalHandler.js.map +1 -1
- package/dist/src/internals/ModalInteraction.d.ts +2 -3
- package/dist/src/internals/ModalInteraction.d.ts.map +1 -1
- package/dist/src/internals/ModalInteraction.js +3 -4
- package/dist/src/internals/ModalInteraction.js.map +1 -1
- package/dist/src/internals/OptionsHandler.d.ts +13 -3
- package/dist/src/internals/OptionsHandler.d.ts.map +1 -1
- package/dist/src/internals/OptionsHandler.js +51 -1
- package/dist/src/internals/OptionsHandler.js.map +1 -1
- package/dist/src/permissions.d.ts +54 -0
- package/dist/src/permissions.d.ts.map +1 -0
- package/dist/src/permissions.js +4 -0
- package/dist/src/permissions.js.map +1 -0
- package/dist/src/plugins/command-data/CommandDataPlugin.d.ts +16 -0
- package/dist/src/plugins/command-data/CommandDataPlugin.d.ts.map +1 -0
- package/dist/src/plugins/command-data/CommandDataPlugin.js +46 -0
- package/dist/src/plugins/command-data/CommandDataPlugin.js.map +1 -0
- package/dist/src/plugins/command-data/index.d.ts +2 -0
- package/dist/src/plugins/command-data/index.d.ts.map +1 -0
- package/dist/src/plugins/command-data/index.js +2 -0
- package/dist/src/plugins/command-data/index.js.map +1 -0
- package/dist/src/plugins/gateway/GatewayPlugin.d.ts +41 -0
- package/dist/src/plugins/gateway/GatewayPlugin.d.ts.map +1 -0
- package/dist/src/plugins/gateway/GatewayPlugin.js +282 -0
- package/dist/src/plugins/gateway/GatewayPlugin.js.map +1 -0
- package/dist/src/plugins/gateway/index.d.ts +6 -0
- package/dist/src/plugins/gateway/index.d.ts.map +1 -0
- package/dist/src/plugins/gateway/index.js +6 -0
- package/dist/src/plugins/gateway/index.js.map +1 -0
- package/dist/src/plugins/gateway/types.d.ts +62 -0
- package/dist/src/plugins/gateway/types.d.ts.map +1 -0
- package/dist/src/plugins/gateway/types.js +5 -0
- package/dist/src/plugins/gateway/types.js.map +1 -0
- package/dist/src/plugins/gateway/utils/heartbeat.d.ts +17 -0
- package/dist/src/plugins/gateway/utils/heartbeat.d.ts.map +1 -0
- package/dist/src/plugins/gateway/utils/heartbeat.js +28 -0
- package/dist/src/plugins/gateway/utils/heartbeat.js.map +1 -0
- package/dist/src/plugins/gateway/utils/monitor.d.ts +37 -0
- package/dist/src/plugins/gateway/utils/monitor.d.ts.map +1 -0
- package/dist/src/plugins/gateway/utils/monitor.js +88 -0
- package/dist/src/plugins/gateway/utils/monitor.js.map +1 -0
- package/dist/src/plugins/gateway/utils/payload.d.ts +22 -0
- package/dist/src/plugins/gateway/utils/payload.d.ts.map +1 -0
- package/dist/src/plugins/gateway/utils/payload.js +47 -0
- package/dist/src/plugins/gateway/utils/payload.js.map +1 -0
- package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.d.ts +26 -0
- package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.d.ts.map +1 -0
- package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.js +74 -0
- package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.js.map +1 -0
- package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.d.ts +9 -0
- package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.d.ts.map +1 -0
- package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.js +10 -0
- package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.js.map +1 -0
- package/dist/src/plugins/gateway-forwarder/index.d.ts +4 -0
- package/dist/src/plugins/gateway-forwarder/index.d.ts.map +1 -0
- package/dist/src/plugins/gateway-forwarder/index.js +4 -0
- package/dist/src/plugins/gateway-forwarder/index.js.map +1 -0
- package/dist/src/plugins/linked-roles/LinkedRoles.d.ts +1 -0
- package/dist/src/plugins/linked-roles/LinkedRoles.d.ts.map +1 -1
- package/dist/src/plugins/linked-roles/LinkedRoles.js +1 -0
- package/dist/src/plugins/linked-roles/LinkedRoles.js.map +1 -1
- package/dist/src/plugins/paginator/Paginator.d.ts +51 -0
- package/dist/src/plugins/paginator/Paginator.d.ts.map +1 -0
- package/dist/src/plugins/paginator/Paginator.js +155 -0
- package/dist/src/plugins/paginator/Paginator.js.map +1 -0
- package/dist/src/plugins/paginator/index.d.ts +8 -0
- package/dist/src/plugins/paginator/index.d.ts.map +1 -0
- package/dist/src/plugins/paginator/index.js +8 -0
- package/dist/src/plugins/paginator/index.js.map +1 -0
- package/dist/src/plugins/sharding/ShardingPlugin.d.ts +43 -0
- package/dist/src/plugins/sharding/ShardingPlugin.d.ts.map +1 -0
- package/dist/src/plugins/sharding/ShardingPlugin.js +111 -0
- package/dist/src/plugins/sharding/ShardingPlugin.js.map +1 -0
- package/dist/src/plugins/sharding/index.d.ts +3 -0
- package/dist/src/plugins/sharding/index.d.ts.map +1 -0
- package/dist/src/plugins/sharding/index.js +3 -0
- package/dist/src/plugins/sharding/index.js.map +1 -0
- package/dist/src/structures/DmChannel.d.ts +3 -3
- package/dist/src/structures/DmChannel.d.ts.map +1 -1
- package/dist/src/structures/DmChannel.js +5 -3
- package/dist/src/structures/DmChannel.js.map +1 -1
- package/dist/src/structures/GroupDmChannel.d.ts +1 -1
- package/dist/src/structures/GroupDmChannel.d.ts.map +1 -1
- package/dist/src/structures/Guild.d.ts +186 -6
- package/dist/src/structures/Guild.d.ts.map +1 -1
- package/dist/src/structures/Guild.js +409 -13
- package/dist/src/structures/Guild.js.map +1 -1
- package/dist/src/structures/GuildCategoryChannel.d.ts +1 -1
- package/dist/src/structures/GuildCategoryChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildForumChannel.d.ts +1 -1
- package/dist/src/structures/GuildForumChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildMember.d.ts +15 -12
- package/dist/src/structures/GuildMember.d.ts.map +1 -1
- package/dist/src/structures/GuildMember.js +78 -19
- package/dist/src/structures/GuildMember.js.map +1 -1
- package/dist/src/structures/GuildStageOrVoiceChannel.d.ts +1 -1
- package/dist/src/structures/GuildStageOrVoiceChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildTextChannel.d.ts +1 -1
- package/dist/src/structures/GuildTextChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildThreadChannel.d.ts +1 -1
- package/dist/src/structures/GuildThreadChannel.d.ts.map +1 -1
- package/dist/src/structures/Message.d.ts +31 -14
- package/dist/src/structures/Message.d.ts.map +1 -1
- package/dist/src/structures/Message.js +126 -17
- package/dist/src/structures/Message.js.map +1 -1
- package/dist/src/structures/Poll.d.ts +25 -0
- package/dist/src/structures/Poll.d.ts.map +1 -0
- package/dist/src/structures/Poll.js +45 -0
- package/dist/src/structures/Poll.js.map +1 -0
- package/dist/src/structures/Role.d.ts +31 -13
- package/dist/src/structures/Role.d.ts.map +1 -1
- package/dist/src/structures/Role.js +50 -21
- package/dist/src/structures/Role.js.map +1 -1
- package/dist/src/structures/ThreadMember.d.ts +36 -0
- package/dist/src/structures/ThreadMember.d.ts.map +1 -0
- package/dist/src/structures/ThreadMember.js +72 -0
- package/dist/src/structures/ThreadMember.js.map +1 -0
- package/dist/src/structures/User.d.ts +10 -4
- package/dist/src/structures/User.d.ts.map +1 -1
- package/dist/src/structures/User.js +10 -1
- package/dist/src/structures/User.js.map +1 -1
- package/dist/src/structures/Webhook.d.ts +135 -0
- package/dist/src/structures/Webhook.d.ts.map +1 -0
- package/dist/src/structures/Webhook.js +239 -0
- package/dist/src/structures/Webhook.js.map +1 -0
- package/dist/src/types/index.d.ts +132 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/listeners.d.ts +566 -0
- package/dist/src/types/listeners.d.ts.map +1 -0
- package/dist/src/types/listeners.js +12 -0
- package/dist/src/types/listeners.js.map +1 -0
- package/dist/src/utils/customIdParser.d.ts +3 -0
- package/dist/src/utils/customIdParser.d.ts.map +1 -0
- package/dist/src/utils/customIdParser.js +17 -0
- package/dist/src/utils/customIdParser.js.map +1 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/index.js +4 -0
- package/dist/src/utils/index.js.map +1 -0
- package/dist/src/utils/payload.d.ts +4 -0
- package/dist/src/utils/payload.d.ts.map +1 -0
- package/dist/src/utils/payload.js +45 -0
- package/dist/src/utils/payload.js.map +1 -0
- package/dist/src/utils/verification.d.ts +4 -0
- package/dist/src/utils/verification.d.ts.map +1 -0
- package/dist/src/{utils.js → utils/verification.js} +1 -26
- package/dist/src/utils/verification.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/dist/src/adapters/cloudflare/index.d.ts +0 -16
- package/dist/src/adapters/cloudflare/index.d.ts.map +0 -1
- package/dist/src/adapters/cloudflare/index.js +0 -17
- package/dist/src/adapters/cloudflare/index.js.map +0 -1
- package/dist/src/adapters/next/index.d.ts +0 -14
- package/dist/src/adapters/next/index.d.ts.map +0 -1
- package/dist/src/adapters/next/index.js +0 -17
- package/dist/src/adapters/next/index.js.map +0 -1
- package/dist/src/adapters/shared.d.ts +0 -10
- package/dist/src/adapters/shared.d.ts.map +0 -1
- package/dist/src/adapters/shared.js +0 -2
- package/dist/src/adapters/shared.js.map +0 -1
- package/dist/src/classes/Button.d.ts.map +0 -1
- package/dist/src/classes/Button.js.map +0 -1
- package/dist/src/classes/ChannelSelectMenu.d.ts.map +0 -1
- package/dist/src/classes/ChannelSelectMenu.js.map +0 -1
- package/dist/src/classes/MentionableSelectMenu.d.ts.map +0 -1
- package/dist/src/classes/MentionableSelectMenu.js.map +0 -1
- package/dist/src/classes/RoleSelectMenu.d.ts.map +0 -1
- package/dist/src/classes/RoleSelectMenu.js +0 -13
- package/dist/src/classes/RoleSelectMenu.js.map +0 -1
- package/dist/src/classes/Row.d.ts +0 -25
- package/dist/src/classes/Row.d.ts.map +0 -1
- package/dist/src/classes/Row.js.map +0 -1
- package/dist/src/classes/StringSelectMenu.d.ts +0 -13
- package/dist/src/classes/StringSelectMenu.d.ts.map +0 -1
- package/dist/src/classes/StringSelectMenu.js +0 -12
- package/dist/src/classes/StringSelectMenu.js.map +0 -1
- package/dist/src/classes/TextInput.d.ts.map +0 -1
- package/dist/src/classes/TextInput.js.map +0 -1
- package/dist/src/classes/UserSelectMenu.d.ts.map +0 -1
- package/dist/src/classes/UserSelectMenu.js +0 -13
- package/dist/src/classes/UserSelectMenu.js.map +0 -1
- package/dist/src/createHandle.d.ts +0 -20
- package/dist/src/createHandle.d.ts.map +0 -1
- package/dist/src/createHandle.js +0 -57
- package/dist/src/createHandle.js.map +0 -1
- package/dist/src/factories/channelFactory.d.ts.map +0 -1
- package/dist/src/factories/channelFactory.js.map +0 -1
- package/dist/src/types/messagePayload.d.ts +0 -37
- package/dist/src/types/messagePayload.d.ts.map +0 -1
- package/dist/src/types/messagePayload.js +0 -2
- package/dist/src/types/messagePayload.js.map +0 -1
- package/dist/src/types.d.ts +0 -38
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -2
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils.d.ts +0 -27
- package/dist/src/utils.d.ts.map +0 -1
- package/dist/src/utils.js.map +0 -1
- /package/dist/src/{factories → functions}/channelFactory.js +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
export class Container extends BaseComponent {
|
|
4
|
+
type = ComponentType.Container;
|
|
5
|
+
isV2 = true;
|
|
6
|
+
/**
|
|
7
|
+
* The accent color of the container
|
|
8
|
+
*/
|
|
9
|
+
accentColor;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the container should be marked a spoiler
|
|
12
|
+
*/
|
|
13
|
+
spoiler = false;
|
|
14
|
+
serialize = () => {
|
|
15
|
+
return {
|
|
16
|
+
type: this.type,
|
|
17
|
+
components: this.components.map((component) => component.serialize()),
|
|
18
|
+
accent_color: this.accentColor
|
|
19
|
+
? typeof this.accentColor === "string"
|
|
20
|
+
? Number.parseInt(this.accentColor.slice(1), 16)
|
|
21
|
+
: this.accentColor
|
|
22
|
+
: undefined,
|
|
23
|
+
spoiler: this.spoiler
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=Container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/classes/components/Container.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAQhE,MAAM,OAAgB,SAAU,SAAQ,aAAa;IAC3C,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,IAAI,CAAA;IAWpB;;OAEG;IACH,WAAW,CAAiC;IAE5C;;OAEG;IACH,OAAO,GAAG,KAAK,CAAA;IAEf,SAAS,GAAG,GAA0B,EAAE;QACvC,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAC7C,SAAS,CAAC,SAAS,EAAE,CACQ;YAC9B,YAAY,EAAE,IAAI,CAAC,WAAW;gBAC7B,CAAC,CAAC,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ;oBACrC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;oBAChD,CAAC,CAAC,IAAI,CAAC,WAAW;gBACnB,CAAC,CAAC,SAAS;YACZ,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAA;IACF,CAAC,CAAA;CACD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { APIFileComponent } from "discord-api-types/v10";
|
|
2
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
3
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
4
|
+
/**
|
|
5
|
+
* Each file component can only display 1 attached file, but you can upload multiple files and add them to different file components within your payload.
|
|
6
|
+
*/
|
|
7
|
+
export declare class File extends BaseComponent {
|
|
8
|
+
readonly type: ComponentType.File;
|
|
9
|
+
readonly isV2 = true;
|
|
10
|
+
/**
|
|
11
|
+
* The attachment to display in the file component.
|
|
12
|
+
*/
|
|
13
|
+
file: `attachment://${string}`;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the file should be displayed as a spoiler.
|
|
16
|
+
*/
|
|
17
|
+
spoiler: boolean;
|
|
18
|
+
constructor(file: `attachment://${string}`, spoiler?: boolean);
|
|
19
|
+
serialize: () => APIFileComponent;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=File.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/File.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE;;GAEG;AACH,qBAAa,IAAK,SAAQ,aAAa;IACtC,QAAQ,CAAC,IAAI,qBAA8B;IAC3C,QAAQ,CAAC,IAAI,QAAO;IAEpB;;OAEG;IACH,IAAI,EAAE,gBAAgB,MAAM,EAAE,CAAA;IAE9B;;OAEG;IACH,OAAO,UAAQ;gBAEH,IAAI,EAAE,gBAAgB,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,OAAO;IAM7D,SAAS,QAAO,gBAAgB,CAS/B;CACD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
/**
|
|
4
|
+
* Each file component can only display 1 attached file, but you can upload multiple files and add them to different file components within your payload.
|
|
5
|
+
*/
|
|
6
|
+
export class File extends BaseComponent {
|
|
7
|
+
type = ComponentType.File;
|
|
8
|
+
isV2 = true;
|
|
9
|
+
/**
|
|
10
|
+
* The attachment to display in the file component.
|
|
11
|
+
*/
|
|
12
|
+
file;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the file should be displayed as a spoiler.
|
|
15
|
+
*/
|
|
16
|
+
spoiler = false;
|
|
17
|
+
constructor(file, spoiler) {
|
|
18
|
+
super();
|
|
19
|
+
this.file = file;
|
|
20
|
+
this.spoiler = spoiler ?? false;
|
|
21
|
+
}
|
|
22
|
+
serialize = () => {
|
|
23
|
+
return {
|
|
24
|
+
type: ComponentType.File,
|
|
25
|
+
id: this.id,
|
|
26
|
+
file: {
|
|
27
|
+
url: this.file
|
|
28
|
+
},
|
|
29
|
+
spoiler: this.spoiler
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=File.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../src/classes/components/File.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,aAAa;IAC7B,IAAI,GAAG,aAAa,CAAC,IAAa,CAAA;IAClC,IAAI,GAAG,IAAI,CAAA;IAEpB;;OAEG;IACH,IAAI,CAA0B;IAE9B;;OAEG;IACH,OAAO,GAAG,KAAK,CAAA;IAEf,YAAY,IAA8B,EAAE,OAAiB;QAC5D,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,KAAK,CAAA;IAChC,CAAC;IAED,SAAS,GAAG,GAAqB,EAAE;QAClC,OAAO;YACN,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE;gBACL,GAAG,EAAE,IAAI,CAAC,IAAI;aACd;YACD,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAA;IACF,CAAC,CAAA;CACD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type APIMediaGalleryComponent, ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
/**
|
|
4
|
+
* A media gallery component can display between 1 and 10 images.
|
|
5
|
+
* Each image can be a direct online URL or an attachment://<name> reference.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class MediaGallery extends BaseComponent {
|
|
8
|
+
readonly type: ComponentType.MediaGallery;
|
|
9
|
+
readonly isV2 = true;
|
|
10
|
+
abstract items: {
|
|
11
|
+
/**
|
|
12
|
+
* The URL of the image. This can either be a direct online URL or an attachment://<name> reference
|
|
13
|
+
*/
|
|
14
|
+
url: string;
|
|
15
|
+
/**
|
|
16
|
+
* The alt text for the image.
|
|
17
|
+
*/
|
|
18
|
+
description?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the image is a spoiler.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
spoiler?: boolean;
|
|
24
|
+
}[];
|
|
25
|
+
serialize: () => APIMediaGalleryComponent;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=MediaGallery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaGallery.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/MediaGallery.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,EAC7B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE;;;GAGG;AACH,8BAAsB,YAAa,SAAQ,aAAa;IACvD,QAAQ,CAAC,IAAI,6BAAsC;IACnD,QAAQ,CAAC,IAAI,QAAO;IAEpB,QAAQ,CAAC,KAAK,EAAE;QACf;;WAEG;QACH,GAAG,EAAE,MAAM,CAAA;QACX;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB;;;WAGG;QACH,OAAO,CAAC,EAAE,OAAO,CAAA;KACjB,EAAE,CAAA;IAEH,SAAS,QAAO,wBAAwB,CAevC;CACD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
/**
|
|
4
|
+
* A media gallery component can display between 1 and 10 images.
|
|
5
|
+
* Each image can be a direct online URL or an attachment://<name> reference.
|
|
6
|
+
*/
|
|
7
|
+
export class MediaGallery extends BaseComponent {
|
|
8
|
+
type = ComponentType.MediaGallery;
|
|
9
|
+
isV2 = true;
|
|
10
|
+
serialize = () => {
|
|
11
|
+
if (this.items.length < 1 || this.items.length > 10) {
|
|
12
|
+
throw new Error("MediaGallery must have between 1 and 10 items");
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
type: ComponentType.MediaGallery,
|
|
16
|
+
id: this.id,
|
|
17
|
+
items: this.items.map((item) => ({
|
|
18
|
+
media: {
|
|
19
|
+
url: item.url
|
|
20
|
+
},
|
|
21
|
+
description: item.description,
|
|
22
|
+
spoiler: item.spoiler
|
|
23
|
+
}))
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=MediaGallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../src/classes/components/MediaGallery.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE;;;GAGG;AACH,MAAM,OAAgB,YAAa,SAAQ,aAAa;IAC9C,IAAI,GAAG,aAAa,CAAC,YAAqB,CAAA;IAC1C,IAAI,GAAG,IAAI,CAAA;IAkBpB,SAAS,GAAG,GAA6B,EAAE;QAC1C,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;YACrD,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;QACjE,CAAC;QACD,OAAO;YACN,IAAI,EAAE,aAAa,CAAC,YAAY;YAChC,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBAChC,KAAK,EAAE;oBACN,GAAG,EAAE,IAAI,CAAC,GAAG;iBACb;gBACD,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;aACrB,CAAC,CAAC;SACH,CAAA;IACF,CAAC,CAAA;CACD"}
|
package/dist/src/classes/{MentionableSelectMenu.d.ts → components/MentionableSelectMenu.d.ts}
RENAMED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type APIMentionableSelectComponent, ComponentType } from "discord-api-types/v10";
|
|
2
|
-
import { AnySelectMenu } from "
|
|
3
|
-
import type { MentionableSelectMenuInteraction } from "
|
|
2
|
+
import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
|
|
3
|
+
import type { MentionableSelectMenuInteraction } from "../../internals/MentionableSelectMenuInteraction.js";
|
|
4
|
+
import type { ComponentData } from "../../types/index.js";
|
|
4
5
|
export declare abstract class MentionableSelectMenu extends AnySelectMenu {
|
|
5
|
-
type: ComponentType.MentionableSelect;
|
|
6
|
+
readonly type: ComponentType.MentionableSelect;
|
|
7
|
+
readonly isV2 = false;
|
|
6
8
|
defaultValues?: APIMentionableSelectComponent["default_values"];
|
|
7
|
-
|
|
9
|
+
run(interaction: MentionableSelectMenuInteraction, data: ComponentData): unknown | Promise<unknown>;
|
|
8
10
|
serializeOptions(): {
|
|
9
11
|
type: ComponentType.MentionableSelect;
|
|
10
12
|
default_values: import("discord-api-types/v10").APISelectMenuDefaultValue<import("discord-api-types/v10").SelectMenuDefaultValueType.Role | import("discord-api-types/v10").SelectMenuDefaultValueType.User>[] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MentionableSelectMenu.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/MentionableSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,6BAA6B,EAClC,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAA;AAC3G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,8BAAsB,qBAAsB,SAAQ,aAAa;IAChE,QAAQ,CAAC,IAAI,kCAA2C;IACxD,QAAQ,CAAC,IAAI,SAAQ;IACrB,aAAa,CAAC,EAAE,6BAA6B,CAAC,gBAAgB,CAAC,CAAA;IAC/D,GAAG,CACF,WAAW,EAAE,gCAAgC,EAC7C,IAAI,EAAE,aAAa,GACjB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAO7B,gBAAgB;;;;CAMhB"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
-
import { AnySelectMenu } from "
|
|
2
|
+
import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
|
|
3
3
|
export class MentionableSelectMenu extends AnySelectMenu {
|
|
4
4
|
type = ComponentType.MentionableSelect;
|
|
5
|
+
isV2 = false;
|
|
5
6
|
defaultValues;
|
|
7
|
+
run(interaction, data) {
|
|
8
|
+
// Random things to show the vars as used
|
|
9
|
+
typeof interaction === "string";
|
|
10
|
+
typeof data === "string";
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
6
13
|
serializeOptions() {
|
|
7
14
|
return {
|
|
8
15
|
type: this.type,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MentionableSelectMenu.js","sourceRoot":"","sources":["../../../../src/classes/components/MentionableSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAIhE,MAAM,OAAgB,qBAAsB,SAAQ,aAAa;IACvD,IAAI,GAAG,aAAa,CAAC,iBAA0B,CAAA;IAC/C,IAAI,GAAG,KAAK,CAAA;IACrB,aAAa,CAAkD;IAC/D,GAAG,CACF,WAA6C,EAC7C,IAAmB;QAEnB,yCAAyC;QACzC,OAAO,WAAW,KAAK,QAAQ,CAAA;QAC/B,OAAO,IAAI,KAAK,QAAQ,CAAA;QACxB,OAAM;IACP,CAAC;IAED,gBAAgB;QACf,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,aAAa;SAClC,CAAA;IACF,CAAC;CACD"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type APIRoleSelectComponent, ComponentType } from "discord-api-types/v10";
|
|
2
|
-
import { AnySelectMenu } from "
|
|
3
|
-
import type { RoleSelectMenuInteraction } from "
|
|
2
|
+
import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
|
|
3
|
+
import type { RoleSelectMenuInteraction } from "../../internals/RoleSelectMenuInteraction.js";
|
|
4
|
+
import type { ComponentData } from "../../types/index.js";
|
|
4
5
|
export declare abstract class RoleSelectMenu extends AnySelectMenu {
|
|
5
|
-
type: ComponentType.RoleSelect;
|
|
6
|
+
readonly type: ComponentType.RoleSelect;
|
|
7
|
+
readonly isV2 = false;
|
|
6
8
|
defaultValues?: APIRoleSelectComponent["default_values"];
|
|
7
|
-
|
|
9
|
+
run(interaction: RoleSelectMenuInteraction, data: ComponentData): unknown | Promise<unknown>;
|
|
8
10
|
serializeOptions(): {
|
|
9
11
|
type: ComponentType.RoleSelect;
|
|
10
12
|
default_values: import("discord-api-types/v10").APISelectMenuDefaultValue<import("discord-api-types/v10").SelectMenuDefaultValueType.Role>[] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleSelectMenu.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/RoleSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,sBAAsB,EAC3B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAA;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,8BAAsB,cAAe,SAAQ,aAAa;IACzD,QAAQ,CAAC,IAAI,2BAAoC;IACjD,QAAQ,CAAC,IAAI,SAAQ;IACrB,aAAa,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAA;IACxD,GAAG,CACF,WAAW,EAAE,yBAAyB,EACtC,IAAI,EAAE,aAAa,GACjB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAO7B,gBAAgB;;;;CAMhB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
|
|
3
|
+
export class RoleSelectMenu extends AnySelectMenu {
|
|
4
|
+
type = ComponentType.RoleSelect;
|
|
5
|
+
isV2 = false;
|
|
6
|
+
defaultValues;
|
|
7
|
+
run(interaction, data) {
|
|
8
|
+
// Random things to show the vars as used
|
|
9
|
+
typeof interaction === "string";
|
|
10
|
+
typeof data === "string";
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
serializeOptions() {
|
|
14
|
+
return {
|
|
15
|
+
type: this.type,
|
|
16
|
+
default_values: this.defaultValues
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=RoleSelectMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleSelectMenu.js","sourceRoot":"","sources":["../../../../src/classes/components/RoleSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAIhE,MAAM,OAAgB,cAAe,SAAQ,aAAa;IAChD,IAAI,GAAG,aAAa,CAAC,UAAmB,CAAA;IACxC,IAAI,GAAG,KAAK,CAAA;IACrB,aAAa,CAA2C;IACxD,GAAG,CACF,WAAsC,EACtC,IAAmB;QAEnB,yCAAyC;QACzC,OAAO,WAAW,KAAK,QAAQ,CAAA;QAC/B,OAAO,IAAI,KAAK,QAAQ,CAAA;QACxB,OAAM;IACP,CAAC;IAED,gBAAgB;QACf,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,aAAa;SAClC,CAAA;IACF,CAAC;CACD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
import type { BaseMessageInteractiveComponent } from "../../abstracts/BaseMessageInteractiveComponent.js";
|
|
4
|
+
import type { BaseModalComponent } from "../../abstracts/BaseModalComponent.js";
|
|
5
|
+
export declare class Row<T extends BaseMessageInteractiveComponent | BaseModalComponent = BaseMessageInteractiveComponent> extends BaseComponent {
|
|
6
|
+
readonly type: ComponentType.ActionRow;
|
|
7
|
+
readonly isV2 = false;
|
|
8
|
+
/**
|
|
9
|
+
* The components in the action row
|
|
10
|
+
*/
|
|
11
|
+
components: T[];
|
|
12
|
+
constructor(components?: T[]);
|
|
13
|
+
/**
|
|
14
|
+
* Add a component to the action row
|
|
15
|
+
* @param component The component to add
|
|
16
|
+
*/
|
|
17
|
+
addComponent(component: T): void;
|
|
18
|
+
/**
|
|
19
|
+
* Remove a component from the action row
|
|
20
|
+
* @param component The component to remove
|
|
21
|
+
*/
|
|
22
|
+
removeComponent(component: T): void;
|
|
23
|
+
/**
|
|
24
|
+
* Remove all components from the action row
|
|
25
|
+
*/
|
|
26
|
+
removeAllComponents(): void;
|
|
27
|
+
serialize: () => ReturnType<BaseComponent["serialize"]>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=Row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/Row.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAA;AACzG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAE/E,qBAAa,GAAG,CACf,CAAC,SACE,+BAA+B,GAC/B,kBAAkB,GAAG,+BAA+B,CACtD,SAAQ,aAAa;IACtB,QAAQ,CAAC,IAAI,0BAAmC;IAChD,QAAQ,CAAC,IAAI,SAAQ;IAErB;;OAEG;IACH,UAAU,EAAE,CAAC,EAAE,CAAK;gBAER,UAAU,CAAC,EAAE,CAAC,EAAE;IAK5B;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,CAAC;IAIzB;;;OAGG;IACH,eAAe,CAAC,SAAS,EAAE,CAAC;IAM5B;;OAEG;IACH,mBAAmB;IAInB,SAAS,QAAO,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAQrD;CACD"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
export class Row extends BaseComponent {
|
|
4
|
+
type = ComponentType.ActionRow;
|
|
5
|
+
isV2 = false;
|
|
2
6
|
/**
|
|
3
7
|
* The components in the action row
|
|
4
8
|
*/
|
|
5
9
|
components = [];
|
|
6
10
|
constructor(components) {
|
|
11
|
+
super();
|
|
7
12
|
if (components)
|
|
8
13
|
this.components = components;
|
|
9
14
|
}
|
|
@@ -32,9 +37,10 @@ export class Row {
|
|
|
32
37
|
}
|
|
33
38
|
serialize = () => {
|
|
34
39
|
return {
|
|
35
|
-
type:
|
|
40
|
+
type: ComponentType.ActionRow,
|
|
36
41
|
components: this.components.map((component) => component.serialize())
|
|
37
42
|
};
|
|
43
|
+
// god i hate these types
|
|
38
44
|
};
|
|
39
45
|
}
|
|
40
46
|
//# sourceMappingURL=Row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Row.js","sourceRoot":"","sources":["../../../../src/classes/components/Row.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAIhE,MAAM,OAAO,GAIX,SAAQ,aAAa;IACb,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,KAAK,CAAA;IAErB;;OAEG;IACH,UAAU,GAAQ,EAAE,CAAA;IAEpB,YAAY,UAAgB;QAC3B,KAAK,EAAE,CAAA;QACP,IAAI,UAAU;YAAE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC7C,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,SAAY;QACxB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAChC,CAAC;IAED;;;OAGG;IACH,eAAe,CAAC,SAAY;QAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QAChD,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE,OAAM;QACxB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IACjC,CAAC;IAED;;OAEG;IACH,mBAAmB;QAClB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAA;IACrB,CAAC;IAED,SAAS,GAAG,GAA2C,EAAE;QACxD,OAAO;YACN,IAAI,EAAE,aAAa,CAAC,SAAS;YAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;SAGhB,CAAA;QACtD,yBAAyB;IAC1B,CAAC,CAAA;CACD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type APISectionComponent, ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
import type { Button, LinkButton } from "./Button.js";
|
|
4
|
+
import type { TextDisplay } from "./TextDisplay.js";
|
|
5
|
+
import type { Thumbnail } from "./Thumbnail.js";
|
|
6
|
+
export declare abstract class Section extends BaseComponent {
|
|
7
|
+
readonly type: ComponentType.Section;
|
|
8
|
+
readonly isV2 = true;
|
|
9
|
+
/**
|
|
10
|
+
* This is the main text that will be displayed in the section.
|
|
11
|
+
* You can have 1-3 TextDisplays in a Section
|
|
12
|
+
*/
|
|
13
|
+
abstract components: TextDisplay[];
|
|
14
|
+
/**
|
|
15
|
+
* The Thumbnail or Button that will be displayed to the right of the main text.
|
|
16
|
+
* You can only have 1 Thumbnail or Button in a Section.
|
|
17
|
+
* If you don't want an accessory, you should be just using the TextDisplay directly.
|
|
18
|
+
*/
|
|
19
|
+
abstract accessory: Thumbnail | Button | LinkButton;
|
|
20
|
+
serialize: () => APISectionComponent;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=Section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/Section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,8BAAsB,OAAQ,SAAQ,aAAa;IAClD,QAAQ,CAAC,IAAI,wBAAiC;IAC9C,QAAQ,CAAC,IAAI,QAAO;IAEpB;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,WAAW,EAAE,CAAA;IAElC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,CAAA;IAEnD,SAAS,QAAO,mBAAmB,CAOlC;CACD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
export class Section extends BaseComponent {
|
|
4
|
+
type = ComponentType.Section;
|
|
5
|
+
isV2 = true;
|
|
6
|
+
serialize = () => {
|
|
7
|
+
return {
|
|
8
|
+
type: this.type,
|
|
9
|
+
id: this.id,
|
|
10
|
+
components: this.components.map((component) => component.serialize()),
|
|
11
|
+
accessory: this.accessory.serialize()
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=Section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.js","sourceRoot":"","sources":["../../../../src/classes/components/Section.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAKhE,MAAM,OAAgB,OAAQ,SAAQ,aAAa;IACzC,IAAI,GAAG,aAAa,CAAC,OAAgB,CAAA;IACrC,IAAI,GAAG,IAAI,CAAA;IAepB,SAAS,GAAG,GAAwB,EAAE;QACrC,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;YACrE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;SACrC,CAAA;IACF,CAAC,CAAA;CACD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type APISeparatorComponent, ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
export declare class Separator extends BaseComponent {
|
|
4
|
+
readonly type: ComponentType.Separator;
|
|
5
|
+
readonly isV2 = true;
|
|
6
|
+
/**
|
|
7
|
+
* Whether a visual divider should be displayed in the component
|
|
8
|
+
*/
|
|
9
|
+
divider: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The size of the separator's padding
|
|
12
|
+
* Either "small" or "large"
|
|
13
|
+
* @default "small"
|
|
14
|
+
*/
|
|
15
|
+
spacing: 1 | 2 | "small" | "large";
|
|
16
|
+
constructor(options?: {
|
|
17
|
+
spacing?: typeof Separator.prototype.spacing;
|
|
18
|
+
divider?: typeof Separator.prototype.divider;
|
|
19
|
+
});
|
|
20
|
+
serialize: () => APISeparatorComponent;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=Separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/Separator.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,qBAAqB,EAC1B,aAAa,EAEb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,qBAAa,SAAU,SAAQ,aAAa;IAC3C,QAAQ,CAAC,IAAI,0BAAmC;IAChD,QAAQ,CAAC,IAAI,QAAO;IAEpB;;OAEG;IACH,OAAO,UAAO;IAEd;;;;OAIG;IACH,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,OAAO,CAAU;gBAG3C,OAAO,GAAE;QACR,OAAO,CAAC,EAAE,OAAO,SAAS,CAAC,SAAS,CAAC,OAAO,CAAA;QAC5C,OAAO,CAAC,EAAE,OAAO,SAAS,CAAC,SAAS,CAAC,OAAO,CAAA;KACvC;IAOP,SAAS,QAAO,qBAAqB,CAWpC;CACD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentType, SeparatorSpacingSize } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
export class Separator extends BaseComponent {
|
|
4
|
+
type = ComponentType.Separator;
|
|
5
|
+
isV2 = true;
|
|
6
|
+
/**
|
|
7
|
+
* Whether a visual divider should be displayed in the component
|
|
8
|
+
*/
|
|
9
|
+
divider = true;
|
|
10
|
+
/**
|
|
11
|
+
* The size of the separator's padding
|
|
12
|
+
* Either "small" or "large"
|
|
13
|
+
* @default "small"
|
|
14
|
+
*/
|
|
15
|
+
spacing = "small"; // integers here because its technically that on the API
|
|
16
|
+
constructor(options = {}) {
|
|
17
|
+
super();
|
|
18
|
+
this.spacing = options.spacing ?? "small";
|
|
19
|
+
this.divider = options.divider ?? true;
|
|
20
|
+
}
|
|
21
|
+
serialize = () => {
|
|
22
|
+
return {
|
|
23
|
+
type: this.type,
|
|
24
|
+
divider: this.divider,
|
|
25
|
+
spacing: typeof this.spacing === "number"
|
|
26
|
+
? this.spacing
|
|
27
|
+
: this.spacing === "small"
|
|
28
|
+
? SeparatorSpacingSize.Small
|
|
29
|
+
: SeparatorSpacingSize.Large
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=Separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../../../../src/classes/components/Separator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,oBAAoB,EACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,MAAM,OAAO,SAAU,SAAQ,aAAa;IAClC,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,IAAI,CAAA;IAEpB;;OAEG;IACH,OAAO,GAAG,IAAI,CAAA;IAEd;;;;OAIG;IACH,OAAO,GAA8B,OAAO,CAAA,CAAC,wDAAwD;IAErG,YACC,UAGI,EAAE;QAEN,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAA;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,IAAI,CAAA;IACvC,CAAC;IAED,SAAS,GAAG,GAA0B,EAAE;QACvC,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EACN,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ;gBAC/B,CAAC,CAAC,IAAI,CAAC,OAAO;gBACd,CAAC,CAAC,IAAI,CAAC,OAAO,KAAK,OAAO;oBACzB,CAAC,CAAC,oBAAoB,CAAC,KAAK;oBAC5B,CAAC,CAAC,oBAAoB,CAAC,KAAK;SAC/B,CAAA;IACF,CAAC,CAAA;CACD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type APIStringSelectComponent, ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
|
|
3
|
+
import type { StringSelectMenuInteraction } from "../../internals/StringSelectMenuInteraction.js";
|
|
4
|
+
import type { ComponentData } from "../../types/index.js";
|
|
5
|
+
export declare abstract class StringSelectMenu extends AnySelectMenu {
|
|
6
|
+
readonly type: ComponentType.StringSelect;
|
|
7
|
+
readonly isV2 = false;
|
|
8
|
+
abstract options: APIStringSelectComponent["options"];
|
|
9
|
+
run(interaction: StringSelectMenuInteraction, data: ComponentData): unknown | Promise<unknown>;
|
|
10
|
+
serializeOptions(): {
|
|
11
|
+
type: ComponentType.StringSelect;
|
|
12
|
+
options: import("discord-api-types/v10").APISelectMenuOption[];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=StringSelectMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringSelectMenu.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/StringSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,EAC7B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAA;AACjG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,8BAAsB,gBAAiB,SAAQ,aAAa;IAC3D,QAAQ,CAAC,IAAI,6BAAsC;IACnD,QAAQ,CAAC,IAAI,SAAQ;IACrB,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAA;IACrD,GAAG,CACF,WAAW,EAAE,2BAA2B,EACxC,IAAI,EAAE,aAAa,GACjB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAO7B,gBAAgB;;;;CAMhB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
|
|
3
|
+
export class StringSelectMenu extends AnySelectMenu {
|
|
4
|
+
type = ComponentType.StringSelect;
|
|
5
|
+
isV2 = false;
|
|
6
|
+
run(interaction, data) {
|
|
7
|
+
// Random things to show the vars as used
|
|
8
|
+
typeof interaction === "string";
|
|
9
|
+
typeof data === "string";
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
serializeOptions() {
|
|
13
|
+
return {
|
|
14
|
+
type: this.type,
|
|
15
|
+
options: this.options
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=StringSelectMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringSelectMenu.js","sourceRoot":"","sources":["../../../../src/classes/components/StringSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAIhE,MAAM,OAAgB,gBAAiB,SAAQ,aAAa;IAClD,IAAI,GAAG,aAAa,CAAC,YAAqB,CAAA;IAC1C,IAAI,GAAG,KAAK,CAAA;IAErB,GAAG,CACF,WAAwC,EACxC,IAAmB;QAEnB,yCAAyC;QACzC,OAAO,WAAW,KAAK,QAAQ,CAAA;QAC/B,OAAO,IAAI,KAAK,QAAQ,CAAA;QACxB,OAAM;IACP,CAAC;IAED,gBAAgB;QACf,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAA;IACF,CAAC;CACD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type APITextDisplayComponent, ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
export declare class TextDisplay extends BaseComponent {
|
|
4
|
+
readonly type: ComponentType.TextDisplay;
|
|
5
|
+
readonly isV2 = true;
|
|
6
|
+
content: string;
|
|
7
|
+
constructor(content: string);
|
|
8
|
+
serialize: () => APITextDisplayComponent;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=TextDisplay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextDisplay.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/TextDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,uBAAuB,EAC5B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,qBAAa,WAAY,SAAQ,aAAa;IAC7C,QAAQ,CAAC,IAAI,4BAAqC;IAClD,QAAQ,CAAC,IAAI,QAAO;IAEpB,OAAO,EAAE,MAAM,CAAA;gBAEH,OAAO,EAAE,MAAM;IAK3B,SAAS,QAAO,uBAAuB,CAMtC;CACD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
export class TextDisplay extends BaseComponent {
|
|
4
|
+
type = ComponentType.TextDisplay;
|
|
5
|
+
isV2 = true;
|
|
6
|
+
content;
|
|
7
|
+
constructor(content) {
|
|
8
|
+
super();
|
|
9
|
+
this.content = content;
|
|
10
|
+
}
|
|
11
|
+
serialize = () => {
|
|
12
|
+
return {
|
|
13
|
+
type: this.type,
|
|
14
|
+
id: this.id,
|
|
15
|
+
content: this.content
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=TextDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextDisplay.js","sourceRoot":"","sources":["../../../../src/classes/components/TextDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,MAAM,OAAO,WAAY,SAAQ,aAAa;IACpC,IAAI,GAAG,aAAa,CAAC,WAAoB,CAAA;IACzC,IAAI,GAAG,IAAI,CAAA;IAEpB,OAAO,CAAQ;IAEf,YAAY,OAAe;QAC1B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACvB,CAAC;IAED,SAAS,GAAG,GAA4B,EAAE;QACzC,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAA;IACF,CAAC,CAAA;CACD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type APITextInputComponent, ComponentType, TextInputStyle } from "discord-api-types/v10";
|
|
2
|
-
import {
|
|
3
|
-
export declare abstract class TextInput extends
|
|
4
|
-
type: ComponentType;
|
|
2
|
+
import { BaseModalComponent } from "../../abstracts/BaseModalComponent.js";
|
|
3
|
+
export declare abstract class TextInput extends BaseModalComponent {
|
|
4
|
+
readonly type: ComponentType.TextInput;
|
|
5
|
+
readonly isV2 = false;
|
|
5
6
|
/**
|
|
6
7
|
* The custom ID of the text input
|
|
7
8
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/TextInput.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,qBAAqB,EAC1B,aAAa,EACb,cAAc,EACd,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAE1E,8BAAsB,SAAU,SAAQ,kBAAkB;IACzD,QAAQ,CAAC,IAAI,0BAAmC;IAChD,QAAQ,CAAC,IAAI,SAAQ;IAErB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAEzB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IAEtB;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAuB;IAE5C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,SAAS,QAAO,qBAAqB,CAYpC;CACD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentType, TextInputStyle } from "discord-api-types/v10";
|
|
2
|
-
import {
|
|
3
|
-
export class TextInput extends
|
|
2
|
+
import { BaseModalComponent } from "../../abstracts/BaseModalComponent.js";
|
|
3
|
+
export class TextInput extends BaseModalComponent {
|
|
4
4
|
type = ComponentType.TextInput;
|
|
5
|
+
isV2 = false;
|
|
5
6
|
/**
|
|
6
7
|
* The style of the text input
|
|
7
8
|
* @default TextInputStyle.Short
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../src/classes/components/TextInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,cAAc,EACd,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAE1E,MAAM,OAAgB,SAAU,SAAQ,kBAAkB;IAChD,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,KAAK,CAAA;IAYrB;;;OAGG;IACH,KAAK,GAAmB,cAAc,CAAC,KAAK,CAAA;IAE5C;;OAEG;IACH,SAAS,CAAS;IAElB;;OAEG;IACH,SAAS,CAAS;IAElB;;OAEG;IACH,QAAQ,CAAU;IAElB;;OAEG;IACH,KAAK,CAAS;IAEd;;OAEG;IACH,WAAW,CAAS;IAEpB,SAAS,GAAG,GAA0B,EAAE;QACvC,OAAO;YACN,IAAI,EAAE,aAAa,CAAC,SAAS;YAC7B,SAAS,EAAE,IAAI,CAAC,QAAQ;YACxB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,UAAU,EAAE,IAAI,CAAC,SAAS;YAC1B,UAAU,EAAE,IAAI,CAAC,SAAS;YAC1B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAA;IACF,CAAC,CAAA;CACD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { APIThumbnailComponent } from "discord-api-types/v10";
|
|
2
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
3
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
4
|
+
export declare abstract class Thumbnail extends BaseComponent {
|
|
5
|
+
readonly type: ComponentType.Thumbnail;
|
|
6
|
+
readonly isV2 = true;
|
|
7
|
+
/**
|
|
8
|
+
* The URL of the thumbnail. This can either be a direct online URL or an attachment://<name> reference
|
|
9
|
+
*/
|
|
10
|
+
abstract url: string;
|
|
11
|
+
serialize: () => APIThumbnailComponent;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Thumbnail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Thumbnail.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/Thumbnail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,8BAAsB,SAAU,SAAQ,aAAa;IACpD,QAAQ,CAAC,IAAI,0BAAmC;IAChD,QAAQ,CAAC,IAAI,QAAO;IAEpB;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IAEpB,SAAS,QAAO,qBAAqB,CAQpC;CACD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
+
import { BaseComponent } from "../../abstracts/BaseComponent.js";
|
|
3
|
+
export class Thumbnail extends BaseComponent {
|
|
4
|
+
type = ComponentType.Thumbnail;
|
|
5
|
+
isV2 = true;
|
|
6
|
+
serialize = () => {
|
|
7
|
+
return {
|
|
8
|
+
type: this.type,
|
|
9
|
+
id: this.id,
|
|
10
|
+
media: {
|
|
11
|
+
url: this.url
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=Thumbnail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Thumbnail.js","sourceRoot":"","sources":["../../../../src/classes/components/Thumbnail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,MAAM,OAAgB,SAAU,SAAQ,aAAa;IAC3C,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,IAAI,CAAA;IAOpB,SAAS,GAAG,GAA0B,EAAE;QACvC,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE;gBACN,GAAG,EAAE,IAAI,CAAC,GAAG;aACb;SACD,CAAA;IACF,CAAC,CAAA;CACD"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type APIUserSelectComponent, ComponentType } from "discord-api-types/v10";
|
|
2
|
-
import { AnySelectMenu } from "
|
|
3
|
-
import type { UserSelectMenuInteraction } from "
|
|
2
|
+
import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
|
|
3
|
+
import type { UserSelectMenuInteraction } from "../../internals/UserSelectMenuInteraction.js";
|
|
4
|
+
import type { ComponentData } from "../../types/index.js";
|
|
4
5
|
export declare abstract class UserSelectMenu extends AnySelectMenu {
|
|
5
|
-
type: ComponentType.UserSelect;
|
|
6
|
+
readonly type: ComponentType.UserSelect;
|
|
7
|
+
readonly isV2 = false;
|
|
6
8
|
defaultValues?: APIUserSelectComponent["default_values"];
|
|
7
|
-
|
|
9
|
+
run(interaction: UserSelectMenuInteraction, data: ComponentData): unknown | Promise<unknown>;
|
|
8
10
|
serializeOptions(): {
|
|
9
11
|
type: ComponentType.UserSelect;
|
|
10
12
|
default_values: import("discord-api-types/v10").APISelectMenuDefaultValue<import("discord-api-types/v10").SelectMenuDefaultValueType.User>[] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserSelectMenu.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/UserSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,sBAAsB,EAC3B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAA;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,8BAAsB,cAAe,SAAQ,aAAa;IACzD,QAAQ,CAAC,IAAI,2BAAoC;IACjD,QAAQ,CAAC,IAAI,SAAQ;IACrB,aAAa,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAA;IACxD,GAAG,CACF,WAAW,EAAE,yBAAyB,EACtC,IAAI,EAAE,aAAa,GACjB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAO7B,gBAAgB;;;;CAMhB"}
|