@buape/carbon 0.1.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/.turbo/turbo-build.log +5 -0
- package/.turbo/turbo-dev.log +12 -0
- package/.turbo/turbo-docs.log +10 -0
- package/CHANGELOG.md +14 -0
- package/LICENSE +21 -0
- package/README.md +45 -0
- package/dist/package.json +18 -0
- package/dist/src/abstracts/AnySelectMenu.d.ts +31 -0
- package/dist/src/abstracts/AnySelectMenu.d.ts.map +1 -0
- package/dist/src/abstracts/AnySelectMenu.js +19 -0
- package/dist/src/abstracts/AnySelectMenu.js.map +1 -0
- package/dist/src/abstracts/AnySelectMenuInteraction.d.ts +12 -0
- package/dist/src/abstracts/AnySelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/abstracts/AnySelectMenuInteraction.js +21 -0
- package/dist/src/abstracts/AnySelectMenuInteraction.js.map +1 -0
- package/dist/src/abstracts/Base.d.ts +10 -0
- package/dist/src/abstracts/Base.d.ts.map +1 -0
- package/dist/src/abstracts/Base.js +11 -0
- package/dist/src/abstracts/Base.js.map +1 -0
- package/dist/src/abstracts/BaseChannel.d.ts +44 -0
- package/dist/src/abstracts/BaseChannel.d.ts.map +1 -0
- package/dist/src/abstracts/BaseChannel.js +58 -0
- package/dist/src/abstracts/BaseChannel.js.map +1 -0
- package/dist/src/abstracts/BaseCommand.d.ts +58 -0
- package/dist/src/abstracts/BaseCommand.d.ts.map +1 -0
- package/dist/src/abstracts/BaseCommand.js +69 -0
- package/dist/src/abstracts/BaseCommand.js.map +1 -0
- package/dist/src/abstracts/BaseComponent.d.ts +34 -0
- package/dist/src/abstracts/BaseComponent.d.ts.map +1 -0
- package/dist/src/abstracts/BaseComponent.js +30 -0
- package/dist/src/abstracts/BaseComponent.js.map +1 -0
- package/dist/src/abstracts/BaseComponentInteraction.d.ts +9 -0
- package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -0
- package/dist/src/abstracts/BaseComponentInteraction.js +14 -0
- package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -0
- package/dist/src/abstracts/BaseGuildChannel.d.ts +68 -0
- package/dist/src/abstracts/BaseGuildChannel.d.ts.map +1 -0
- package/dist/src/abstracts/BaseGuildChannel.js +130 -0
- package/dist/src/abstracts/BaseGuildChannel.js.map +1 -0
- package/dist/src/abstracts/BaseGuildTextChannel.d.ts +42 -0
- package/dist/src/abstracts/BaseGuildTextChannel.d.ts.map +1 -0
- package/dist/src/abstracts/BaseGuildTextChannel.js +61 -0
- package/dist/src/abstracts/BaseGuildTextChannel.js.map +1 -0
- package/dist/src/abstracts/BaseInteraction.d.ts +87 -0
- package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -0
- package/dist/src/abstracts/BaseInteraction.js +101 -0
- package/dist/src/abstracts/BaseInteraction.js.map +1 -0
- package/dist/src/abstracts/ButtonInteraction.d.ts +8 -0
- package/dist/src/abstracts/ButtonInteraction.d.ts.map +1 -0
- package/dist/src/abstracts/ButtonInteraction.js +18 -0
- package/dist/src/abstracts/ButtonInteraction.js.map +1 -0
- package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts +7 -0
- package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/abstracts/ChannelSelectMenuInteraction.js +11 -0
- package/dist/src/abstracts/ChannelSelectMenuInteraction.js.map +1 -0
- package/dist/src/abstracts/CommandHandler.d.ts +6 -0
- package/dist/src/abstracts/CommandHandler.d.ts.map +1 -0
- package/dist/src/abstracts/CommandHandler.js +65 -0
- package/dist/src/abstracts/CommandHandler.js.map +1 -0
- package/dist/src/abstracts/CommandInteraction.d.ts +15 -0
- package/dist/src/abstracts/CommandInteraction.d.ts.map +1 -0
- package/dist/src/abstracts/CommandInteraction.js +60 -0
- package/dist/src/abstracts/CommandInteraction.js.map +1 -0
- package/dist/src/abstracts/ComponentHandler.d.ts +6 -0
- package/dist/src/abstracts/ComponentHandler.d.ts.map +1 -0
- package/dist/src/abstracts/ComponentHandler.js +64 -0
- package/dist/src/abstracts/ComponentHandler.js.map +1 -0
- package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts +42 -0
- package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts.map +1 -0
- package/dist/src/abstracts/GuildThreadOnlyChannel.js +54 -0
- package/dist/src/abstracts/GuildThreadOnlyChannel.js.map +1 -0
- package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts +8 -0
- package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/abstracts/MentionableSelectMenuInteraction.js +15 -0
- package/dist/src/abstracts/MentionableSelectMenuInteraction.js.map +1 -0
- package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts +8 -0
- package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/abstracts/RoleSelectMenuInteraction.js +14 -0
- package/dist/src/abstracts/RoleSelectMenuInteraction.js.map +1 -0
- package/dist/src/abstracts/StringSelectMenuInteraction.d.ts +8 -0
- package/dist/src/abstracts/StringSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/abstracts/StringSelectMenuInteraction.js +14 -0
- package/dist/src/abstracts/StringSelectMenuInteraction.js.map +1 -0
- package/dist/src/abstracts/UserSelectMenuInteraction.d.ts +8 -0
- package/dist/src/abstracts/UserSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/abstracts/UserSelectMenuInteraction.js +14 -0
- package/dist/src/abstracts/UserSelectMenuInteraction.js.map +1 -0
- package/dist/src/classes/Button.d.ts +53 -0
- package/dist/src/classes/Button.d.ts.map +1 -0
- package/dist/src/classes/Button.js +55 -0
- package/dist/src/classes/Button.js.map +1 -0
- package/dist/src/classes/ChannelSelectMenu.d.ts +15 -0
- package/dist/src/classes/ChannelSelectMenu.d.ts.map +1 -0
- package/dist/src/classes/ChannelSelectMenu.js +15 -0
- package/dist/src/classes/ChannelSelectMenu.js.map +1 -0
- package/dist/src/classes/Client.d.ts +117 -0
- package/dist/src/classes/Client.d.ts.map +1 -0
- package/dist/src/classes/Client.js +170 -0
- package/dist/src/classes/Client.js.map +1 -0
- package/dist/src/classes/Command.d.ts +35 -0
- package/dist/src/classes/Command.d.ts.map +1 -0
- package/dist/src/classes/Command.js +31 -0
- package/dist/src/classes/Command.js.map +1 -0
- package/dist/src/classes/CommandWithSubcommandGroups.d.ts +22 -0
- package/dist/src/classes/CommandWithSubcommandGroups.d.ts.map +1 -0
- package/dist/src/classes/CommandWithSubcommandGroups.js +31 -0
- package/dist/src/classes/CommandWithSubcommandGroups.js.map +1 -0
- package/dist/src/classes/CommandWithSubcommands.d.ts +19 -0
- package/dist/src/classes/CommandWithSubcommands.d.ts.map +1 -0
- package/dist/src/classes/CommandWithSubcommands.js +21 -0
- package/dist/src/classes/CommandWithSubcommands.js.map +1 -0
- package/dist/src/classes/MentionableSelectMenu.d.ts +13 -0
- package/dist/src/classes/MentionableSelectMenu.d.ts.map +1 -0
- package/dist/src/classes/MentionableSelectMenu.js +13 -0
- package/dist/src/classes/MentionableSelectMenu.js.map +1 -0
- package/dist/src/classes/Paginator.d.ts +3 -0
- package/dist/src/classes/Paginator.d.ts.map +1 -0
- package/dist/src/classes/Paginator.js +3 -0
- package/dist/src/classes/Paginator.js.map +1 -0
- package/dist/src/classes/RoleSelectMenu.d.ts +13 -0
- package/dist/src/classes/RoleSelectMenu.d.ts.map +1 -0
- package/dist/src/classes/RoleSelectMenu.js +13 -0
- package/dist/src/classes/RoleSelectMenu.js.map +1 -0
- package/dist/src/classes/Row.d.ts +27 -0
- package/dist/src/classes/Row.d.ts.map +1 -0
- package/dist/src/classes/Row.js +39 -0
- package/dist/src/classes/Row.js.map +1 -0
- package/dist/src/classes/StringSelectMenu.d.ts +13 -0
- package/dist/src/classes/StringSelectMenu.d.ts.map +1 -0
- package/dist/src/classes/StringSelectMenu.js +12 -0
- package/dist/src/classes/StringSelectMenu.js.map +1 -0
- package/dist/src/classes/UserSelectMenu.d.ts +13 -0
- package/dist/src/classes/UserSelectMenu.d.ts.map +1 -0
- package/dist/src/classes/UserSelectMenu.js +13 -0
- package/dist/src/classes/UserSelectMenu.js.map +1 -0
- package/dist/src/factories/channelFactory.d.ts +13 -0
- package/dist/src/factories/channelFactory.d.ts.map +1 -0
- package/dist/src/factories/channelFactory.js +39 -0
- package/dist/src/factories/channelFactory.js.map +1 -0
- package/dist/src/index.d.ts +49 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +55 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/internals/AutocompleteInteraction.d.ts +34 -0
- package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -0
- package/dist/src/internals/AutocompleteInteraction.js +68 -0
- package/dist/src/internals/AutocompleteInteraction.js.map +1 -0
- package/dist/src/internals/ButtonInteraction.d.ts +8 -0
- package/dist/src/internals/ButtonInteraction.d.ts.map +1 -0
- package/dist/src/internals/ButtonInteraction.js +18 -0
- package/dist/src/internals/ButtonInteraction.js.map +1 -0
- package/dist/src/internals/ChannelSelectMenuInteraction.d.ts +7 -0
- package/dist/src/internals/ChannelSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/internals/ChannelSelectMenuInteraction.js +11 -0
- package/dist/src/internals/ChannelSelectMenuInteraction.js.map +1 -0
- package/dist/src/internals/CommandHandler.d.ts +8 -0
- package/dist/src/internals/CommandHandler.d.ts.map +1 -0
- package/dist/src/internals/CommandHandler.js +81 -0
- package/dist/src/internals/CommandHandler.js.map +1 -0
- package/dist/src/internals/CommandInteraction.d.ts +17 -0
- package/dist/src/internals/CommandInteraction.d.ts.map +1 -0
- package/dist/src/internals/CommandInteraction.js +29 -0
- package/dist/src/internals/CommandInteraction.js.map +1 -0
- package/dist/src/internals/ComponentHandler.d.ts +6 -0
- package/dist/src/internals/ComponentHandler.d.ts.map +1 -0
- package/dist/src/internals/ComponentHandler.js +64 -0
- package/dist/src/internals/ComponentHandler.js.map +1 -0
- package/dist/src/internals/MentionableSelectMenuInteraction.d.ts +8 -0
- package/dist/src/internals/MentionableSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/internals/MentionableSelectMenuInteraction.js +15 -0
- package/dist/src/internals/MentionableSelectMenuInteraction.js.map +1 -0
- package/dist/src/internals/OptionsHandler.d.ts +70 -0
- package/dist/src/internals/OptionsHandler.d.ts.map +1 -0
- package/dist/src/internals/OptionsHandler.js +115 -0
- package/dist/src/internals/OptionsHandler.js.map +1 -0
- package/dist/src/internals/RoleSelectMenuInteraction.d.ts +8 -0
- package/dist/src/internals/RoleSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/internals/RoleSelectMenuInteraction.js +14 -0
- package/dist/src/internals/RoleSelectMenuInteraction.js.map +1 -0
- package/dist/src/internals/StringSelectMenuInteraction.d.ts +8 -0
- package/dist/src/internals/StringSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/internals/StringSelectMenuInteraction.js +14 -0
- package/dist/src/internals/StringSelectMenuInteraction.js.map +1 -0
- package/dist/src/internals/UserSelectMenuInteraction.d.ts +8 -0
- package/dist/src/internals/UserSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/internals/UserSelectMenuInteraction.js +14 -0
- package/dist/src/internals/UserSelectMenuInteraction.js.map +1 -0
- package/dist/src/structures/AnySelectMenu.d.ts +31 -0
- package/dist/src/structures/AnySelectMenu.d.ts.map +1 -0
- package/dist/src/structures/AnySelectMenu.js +19 -0
- package/dist/src/structures/AnySelectMenu.js.map +1 -0
- package/dist/src/structures/AnySelectMenuInteraction.d.ts +12 -0
- package/dist/src/structures/AnySelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/structures/AnySelectMenuInteraction.js +21 -0
- package/dist/src/structures/AnySelectMenuInteraction.js.map +1 -0
- package/dist/src/structures/Base.d.ts +10 -0
- package/dist/src/structures/Base.d.ts.map +1 -0
- package/dist/src/structures/Base.js +11 -0
- package/dist/src/structures/Base.js.map +1 -0
- package/dist/src/structures/BaseCommand.d.ts +64 -0
- package/dist/src/structures/BaseCommand.d.ts.map +1 -0
- package/dist/src/structures/BaseCommand.js +58 -0
- package/dist/src/structures/BaseCommand.js.map +1 -0
- package/dist/src/structures/BaseComponent.d.ts +34 -0
- package/dist/src/structures/BaseComponent.d.ts.map +1 -0
- package/dist/src/structures/BaseComponent.js +30 -0
- package/dist/src/structures/BaseComponent.js.map +1 -0
- package/dist/src/structures/BaseComponentInteraction.d.ts +9 -0
- package/dist/src/structures/BaseComponentInteraction.d.ts.map +1 -0
- package/dist/src/structures/BaseComponentInteraction.js +14 -0
- package/dist/src/structures/BaseComponentInteraction.js.map +1 -0
- package/dist/src/structures/BaseInteraction.d.ts +81 -0
- package/dist/src/structures/BaseInteraction.d.ts.map +1 -0
- package/dist/src/structures/BaseInteraction.js +99 -0
- package/dist/src/structures/BaseInteraction.js.map +1 -0
- package/dist/src/structures/ButtonInteraction.d.ts +8 -0
- package/dist/src/structures/ButtonInteraction.d.ts.map +1 -0
- package/dist/src/structures/ButtonInteraction.js +18 -0
- package/dist/src/structures/ButtonInteraction.js.map +1 -0
- package/dist/src/structures/ChannelSelectMenuInteraction.d.ts +7 -0
- package/dist/src/structures/ChannelSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/structures/ChannelSelectMenuInteraction.js +11 -0
- package/dist/src/structures/ChannelSelectMenuInteraction.js.map +1 -0
- package/dist/src/structures/CommandHandler.d.ts +6 -0
- package/dist/src/structures/CommandHandler.d.ts.map +1 -0
- package/dist/src/structures/CommandHandler.js +70 -0
- package/dist/src/structures/CommandHandler.js.map +1 -0
- package/dist/src/structures/CommandInteraction.d.ts +15 -0
- package/dist/src/structures/CommandInteraction.d.ts.map +1 -0
- package/dist/src/structures/CommandInteraction.js +60 -0
- package/dist/src/structures/CommandInteraction.js.map +1 -0
- package/dist/src/structures/ComponentHandler.d.ts +6 -0
- package/dist/src/structures/ComponentHandler.d.ts.map +1 -0
- package/dist/src/structures/ComponentHandler.js +64 -0
- package/dist/src/structures/ComponentHandler.js.map +1 -0
- package/dist/src/structures/DmChannel.d.ts +18 -0
- package/dist/src/structures/DmChannel.d.ts.map +1 -0
- package/dist/src/structures/DmChannel.js +24 -0
- package/dist/src/structures/DmChannel.js.map +1 -0
- package/dist/src/structures/GroupDmChannel.d.ts +67 -0
- package/dist/src/structures/GroupDmChannel.d.ts.map +1 -0
- package/dist/src/structures/GroupDmChannel.js +109 -0
- package/dist/src/structures/GroupDmChannel.js.map +1 -0
- package/dist/src/structures/Guild.d.ts +71 -0
- package/dist/src/structures/Guild.d.ts.map +1 -0
- package/dist/src/structures/Guild.js +123 -0
- package/dist/src/structures/Guild.js.map +1 -0
- package/dist/src/structures/GuildAnnouncementChannel.d.ts +12 -0
- package/dist/src/structures/GuildAnnouncementChannel.d.ts.map +1 -0
- package/dist/src/structures/GuildAnnouncementChannel.js +17 -0
- package/dist/src/structures/GuildAnnouncementChannel.js.map +1 -0
- package/dist/src/structures/GuildCategoryChannel.d.ts +13 -0
- package/dist/src/structures/GuildCategoryChannel.d.ts.map +1 -0
- package/dist/src/structures/GuildCategoryChannel.js +14 -0
- package/dist/src/structures/GuildCategoryChannel.js.map +1 -0
- package/dist/src/structures/GuildForumChannel.d.ts +13 -0
- package/dist/src/structures/GuildForumChannel.d.ts.map +1 -0
- package/dist/src/structures/GuildForumChannel.js +14 -0
- package/dist/src/structures/GuildForumChannel.js.map +1 -0
- package/dist/src/structures/GuildMediaChannel.d.ts +13 -0
- package/dist/src/structures/GuildMediaChannel.d.ts.map +1 -0
- package/dist/src/structures/GuildMediaChannel.js +12 -0
- package/dist/src/structures/GuildMediaChannel.js.map +1 -0
- package/dist/src/structures/GuildStageOrVoiceChannel.d.ts +30 -0
- package/dist/src/structures/GuildStageOrVoiceChannel.d.ts.map +1 -0
- package/dist/src/structures/GuildStageOrVoiceChannel.js +34 -0
- package/dist/src/structures/GuildStageOrVoiceChannel.js.map +1 -0
- package/dist/src/structures/GuildTextChannel.d.ts +15 -0
- package/dist/src/structures/GuildTextChannel.d.ts.map +1 -0
- package/dist/src/structures/GuildTextChannel.js +18 -0
- package/dist/src/structures/GuildTextChannel.js.map +1 -0
- package/dist/src/structures/GuildThreadChannel.d.ts +89 -0
- package/dist/src/structures/GuildThreadChannel.d.ts.map +1 -0
- package/dist/src/structures/GuildThreadChannel.js +134 -0
- package/dist/src/structures/GuildThreadChannel.js.map +1 -0
- package/dist/src/structures/MentionableSelectMenuInteraction.d.ts +8 -0
- package/dist/src/structures/MentionableSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/structures/MentionableSelectMenuInteraction.js +15 -0
- package/dist/src/structures/MentionableSelectMenuInteraction.js.map +1 -0
- package/dist/src/structures/Message.d.ts +52 -0
- package/dist/src/structures/Message.d.ts.map +1 -0
- package/dist/src/structures/Message.js +93 -0
- package/dist/src/structures/Message.js.map +1 -0
- package/dist/src/structures/Role.d.ts +106 -0
- package/dist/src/structures/Role.d.ts.map +1 -0
- package/dist/src/structures/Role.js +181 -0
- package/dist/src/structures/Role.js.map +1 -0
- package/dist/src/structures/RoleSelectMenuInteraction.d.ts +8 -0
- package/dist/src/structures/RoleSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/structures/RoleSelectMenuInteraction.js +14 -0
- package/dist/src/structures/RoleSelectMenuInteraction.js.map +1 -0
- package/dist/src/structures/StringSelectMenuInteraction.d.ts +8 -0
- package/dist/src/structures/StringSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/structures/StringSelectMenuInteraction.js +14 -0
- package/dist/src/structures/StringSelectMenuInteraction.js.map +1 -0
- package/dist/src/structures/User.d.ts +80 -0
- package/dist/src/structures/User.d.ts.map +1 -0
- package/dist/src/structures/User.js +133 -0
- package/dist/src/structures/User.js.map +1 -0
- package/dist/src/structures/UserSelectMenuInteraction.d.ts +8 -0
- package/dist/src/structures/UserSelectMenuInteraction.d.ts.map +1 -0
- package/dist/src/structures/UserSelectMenuInteraction.js +14 -0
- package/dist/src/structures/UserSelectMenuInteraction.js.map +1 -0
- package/dist/src/types.d.ts +31 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +33 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils.d.ts +2 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +11 -0
- package/dist/src/utils.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/docs/classes/AnySelectMenu.mdx +114 -0
- package/docs/classes/AnySelectMenuInteraction.mdx +161 -0
- package/docs/classes/AutocompleteInteraction.mdx +152 -0
- package/docs/classes/AutocompleteOptionsHandler.mdx +243 -0
- package/docs/classes/BaseChannel.mdx +97 -0
- package/docs/classes/BaseCommand.mdx +61 -0
- package/docs/classes/BaseComponent.mdx +55 -0
- package/docs/classes/BaseComponentInteraction.mdx +146 -0
- package/docs/classes/BaseGuildChannel.mdx +262 -0
- package/docs/classes/BaseGuildTextChannel.mdx +360 -0
- package/docs/classes/BaseInteraction.mdx +127 -0
- package/docs/classes/Button.mdx +99 -0
- package/docs/classes/ButtonInteraction.mdx +141 -0
- package/docs/classes/ChannelSelectMenu.mdx +122 -0
- package/docs/classes/ChannelSelectMenuInteraction.mdx +157 -0
- package/docs/classes/Client.mdx +48 -0
- package/docs/classes/Command.mdx +111 -0
- package/docs/classes/CommandHandler.mdx +65 -0
- package/docs/classes/CommandInteraction.mdx +141 -0
- package/docs/classes/CommandWithSubcommandGroups.mdx +73 -0
- package/docs/classes/CommandWithSubcommands.mdx +76 -0
- package/docs/classes/ComponentHandler.mdx +49 -0
- package/docs/classes/DmChannel.mdx +118 -0
- package/docs/classes/GroupDmChannel.mdx +197 -0
- package/docs/classes/Guild.mdx +139 -0
- package/docs/classes/GuildAnnouncementChannel.mdx +377 -0
- package/docs/classes/GuildCategoryChannel.mdx +272 -0
- package/docs/classes/GuildForumChannel.mdx +333 -0
- package/docs/classes/GuildMediaChannel.mdx +327 -0
- package/docs/classes/GuildStageChannel.mdx +276 -0
- package/docs/classes/GuildStageOrVoiceChannel.mdx +292 -0
- package/docs/classes/GuildTextChannel.mdx +367 -0
- package/docs/classes/GuildThreadChannel.mdx +425 -0
- package/docs/classes/GuildThreadOnlyChannel.mdx +333 -0
- package/docs/classes/GuildVoiceChannel.mdx +276 -0
- package/docs/classes/LinkButton.mdx +84 -0
- package/docs/classes/MentionableSelectMenu.mdx +120 -0
- package/docs/classes/MentionableSelectMenuInteraction.mdx +157 -0
- package/docs/classes/Message.mdx +126 -0
- package/docs/classes/OptionsHandler.mdx +203 -0
- package/docs/classes/PremiumButton.mdx +84 -0
- package/docs/classes/Role.mdx +228 -0
- package/docs/classes/RoleSelectMenu.mdx +120 -0
- package/docs/classes/RoleSelectMenuInteraction.mdx +157 -0
- package/docs/classes/Row.mdx +88 -0
- package/docs/classes/StringSelectMenu.mdx +120 -0
- package/docs/classes/StringSelectMenuInteraction.mdx +157 -0
- package/docs/classes/User.mdx +119 -0
- package/docs/classes/UserSelectMenu.mdx +120 -0
- package/docs/classes/UserSelectMenuInteraction.mdx +157 -0
- package/docs/enumerations/ClientMode.mdx +16 -0
- package/docs/functions/channelFactory.mdx +16 -0
- package/docs/index.mdx +83 -0
- package/docs/type-aliases/AnySelectMenuComponentType.mdx +5 -0
- package/docs/type-aliases/ClientOptions.mdx +20 -0
- package/docs/type-aliases/CommandOptions.mdx +5 -0
- package/docs/type-aliases/ComponentAdditionalData.mdx +9 -0
- package/docs/type-aliases/InteractionFileData.mdx +15 -0
- package/docs/type-aliases/InteractionReplyData.mdx +14 -0
- package/docs/type-aliases/InteractionReplyOptions.mdx +13 -0
- package/docs/type-aliases/RawOptions.mdx +9 -0
- package/docs/type-aliases/meta.json +3 -0
- package/package.json +18 -0
- package/src/README.md +7 -0
- package/src/abstracts/AnySelectMenu.ts +63 -0
- package/src/abstracts/AnySelectMenuInteraction.ts +29 -0
- package/src/abstracts/Base.ts +12 -0
- package/src/abstracts/BaseChannel.ts +73 -0
- package/src/abstracts/BaseCommand.ts +95 -0
- package/src/abstracts/BaseComponent.ts +49 -0
- package/src/abstracts/BaseComponentInteraction.ts +19 -0
- package/src/abstracts/BaseGuildChannel.ts +152 -0
- package/src/abstracts/BaseGuildTextChannel.ts +77 -0
- package/src/abstracts/BaseInteraction.ts +170 -0
- package/src/abstracts/GuildThreadOnlyChannel.ts +71 -0
- package/src/classes/Button.ts +95 -0
- package/src/classes/ChannelSelectMenu.ts +21 -0
- package/src/classes/Client.ts +249 -0
- package/src/classes/Command.ts +51 -0
- package/src/classes/CommandWithSubcommandGroups.ts +47 -0
- package/src/classes/CommandWithSubcommands.ts +35 -0
- package/src/classes/MentionableSelectMenu.ts +19 -0
- package/src/classes/RoleSelectMenu.ts +19 -0
- package/src/classes/Row.ts +44 -0
- package/src/classes/StringSelectMenu.ts +19 -0
- package/src/classes/UserSelectMenu.ts +19 -0
- package/src/factories/channelFactory.ts +43 -0
- package/src/index.ts +59 -0
- package/src/internals/AutocompleteInteraction.ts +107 -0
- package/src/internals/ButtonInteraction.ts +26 -0
- package/src/internals/ChannelSelectMenuInteraction.ts +15 -0
- package/src/internals/CommandHandler.ts +123 -0
- package/src/internals/CommandInteraction.ts +49 -0
- package/src/internals/ComponentHandler.ts +81 -0
- package/src/internals/MentionableSelectMenuInteraction.ts +21 -0
- package/src/internals/OptionsHandler.ts +147 -0
- package/src/internals/RoleSelectMenuInteraction.ts +20 -0
- package/src/internals/StringSelectMenuInteraction.ts +20 -0
- package/src/internals/UserSelectMenuInteraction.ts +20 -0
- package/src/structures/DmChannel.ts +31 -0
- package/src/structures/GroupDmChannel.ts +132 -0
- package/src/structures/Guild.ts +142 -0
- package/src/structures/GuildAnnouncementChannel.ts +20 -0
- package/src/structures/GuildCategoryChannel.ts +16 -0
- package/src/structures/GuildForumChannel.ts +20 -0
- package/src/structures/GuildMediaChannel.ts +13 -0
- package/src/structures/GuildStageOrVoiceChannel.ts +46 -0
- package/src/structures/GuildTextChannel.ts +21 -0
- package/src/structures/GuildThreadChannel.ts +150 -0
- package/src/structures/Message.ts +124 -0
- package/src/structures/Role.ts +201 -0
- package/src/structures/User.ts +153 -0
- package/src/utils.ts +13 -0
- package/tests/index.test.ts +4 -0
- package/tsconfig.json +12 -0
- package/typedoc.json +9 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type APIRole,
|
|
3
|
+
type APIRoleTags,
|
|
4
|
+
type RoleFlags,
|
|
5
|
+
Routes
|
|
6
|
+
} from "discord-api-types/v10"
|
|
7
|
+
import { Base } from "../abstracts/Base.js"
|
|
8
|
+
import type { Client } from "../classes/Client.js"
|
|
9
|
+
|
|
10
|
+
export class Role extends Base {
|
|
11
|
+
/**
|
|
12
|
+
* The ID of the role.
|
|
13
|
+
*/
|
|
14
|
+
id: string
|
|
15
|
+
/**
|
|
16
|
+
* The name of the role.
|
|
17
|
+
*/
|
|
18
|
+
name?: string | null
|
|
19
|
+
/**
|
|
20
|
+
* The color of the role.
|
|
21
|
+
*/
|
|
22
|
+
color?: number | null
|
|
23
|
+
/**
|
|
24
|
+
* The icon hash of the role.
|
|
25
|
+
* You can use {@link Role.iconUrl} to get the URL of the icon.
|
|
26
|
+
*/
|
|
27
|
+
icon?: string | null
|
|
28
|
+
/**
|
|
29
|
+
* If this role is mentionable.
|
|
30
|
+
*/
|
|
31
|
+
mentionable?: boolean | null
|
|
32
|
+
/**
|
|
33
|
+
* If this role is hoisted.
|
|
34
|
+
*/
|
|
35
|
+
hoisted?: boolean | null
|
|
36
|
+
/**
|
|
37
|
+
* The position of the role.
|
|
38
|
+
*/
|
|
39
|
+
position?: number | null
|
|
40
|
+
/**
|
|
41
|
+
* The permissions of the role.
|
|
42
|
+
*/
|
|
43
|
+
permissions?: string | null
|
|
44
|
+
/**
|
|
45
|
+
* If this role is managed by an integration.
|
|
46
|
+
*/
|
|
47
|
+
managed?: boolean | null
|
|
48
|
+
/**
|
|
49
|
+
* The unicode emoji for the role.
|
|
50
|
+
*/
|
|
51
|
+
unicodeEmoji?: string | null
|
|
52
|
+
/**
|
|
53
|
+
* The flags of this role.
|
|
54
|
+
* @see https://discord.com/developers/docs/topics/permissions#role-object-role-flags
|
|
55
|
+
*/
|
|
56
|
+
flags?: RoleFlags | null
|
|
57
|
+
/**
|
|
58
|
+
* The tags of this role.
|
|
59
|
+
* @see https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
|
|
60
|
+
*/
|
|
61
|
+
tags?: APIRoleTags | null
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Whether the role is a partial role (meaning it does not have all the data).
|
|
65
|
+
* If this is true, you should use {@link Role.fetch} to get the full data of the role.
|
|
66
|
+
*/
|
|
67
|
+
partial: boolean
|
|
68
|
+
|
|
69
|
+
private rawData: APIRole | null = null
|
|
70
|
+
|
|
71
|
+
constructor(client: Client, rawDataOrId: APIRole | string) {
|
|
72
|
+
super(client)
|
|
73
|
+
if (typeof rawDataOrId === "string") {
|
|
74
|
+
this.id = rawDataOrId
|
|
75
|
+
this.partial = true
|
|
76
|
+
} else {
|
|
77
|
+
this.rawData = rawDataOrId
|
|
78
|
+
this.id = rawDataOrId.id
|
|
79
|
+
this.partial = false
|
|
80
|
+
this.setData(rawDataOrId)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private setData(data: typeof this.rawData) {
|
|
85
|
+
if (!data) throw new Error("Cannot set data without having data... smh")
|
|
86
|
+
this.rawData = data
|
|
87
|
+
this.name = data.name
|
|
88
|
+
this.color = data.color
|
|
89
|
+
this.icon = data.icon
|
|
90
|
+
this.mentionable = data.mentionable
|
|
91
|
+
this.hoisted = data.hoist
|
|
92
|
+
this.position = data.position
|
|
93
|
+
this.permissions = data.permissions
|
|
94
|
+
this.managed = data.managed
|
|
95
|
+
this.unicodeEmoji = data.unicode_emoji
|
|
96
|
+
this.flags = data.flags
|
|
97
|
+
this.tags = data.tags
|
|
98
|
+
this.partial = false
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Fetch updated data for this role.
|
|
103
|
+
* If the role is partial, this will fetch all the data for the role and populate the fields.
|
|
104
|
+
* If the role is not partial, all fields will be updated with new values from Discord.
|
|
105
|
+
*/
|
|
106
|
+
async fetch(guildId: string) {
|
|
107
|
+
const newData = (await this.client.rest.get(
|
|
108
|
+
Routes.guildRole(guildId, this.id)
|
|
109
|
+
)) as APIRole
|
|
110
|
+
if (!newData) throw new Error(`Role ${this.id} not found`)
|
|
111
|
+
|
|
112
|
+
this.setData(newData)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Set the name of the role
|
|
117
|
+
*/
|
|
118
|
+
async setName(guildId: string, name: string) {
|
|
119
|
+
await this.client.rest.patch(Routes.guildRole(guildId, this.id), {
|
|
120
|
+
body: {
|
|
121
|
+
name
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
this.name = name
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Set the color of the role
|
|
129
|
+
*/
|
|
130
|
+
async setColor(guildId: string, color: number) {
|
|
131
|
+
await this.client.rest.patch(Routes.guildRole(guildId, this.id), {
|
|
132
|
+
body: { color }
|
|
133
|
+
})
|
|
134
|
+
this.color = color
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Set the icon of the role
|
|
139
|
+
* @param icon The unicode emoji or icon URL to set
|
|
140
|
+
*/
|
|
141
|
+
async setIcon(guildId: string, icon: string) {
|
|
142
|
+
await this.client.rest.patch(Routes.guildRole(guildId, this.id), {
|
|
143
|
+
body: { icon }
|
|
144
|
+
})
|
|
145
|
+
this.icon = icon
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Set the mentionable status of the role
|
|
150
|
+
*/
|
|
151
|
+
async setMentionable(guildId: string, mentionable: boolean) {
|
|
152
|
+
await this.client.rest.patch(Routes.guildRole(guildId, this.id), {
|
|
153
|
+
body: { mentionable }
|
|
154
|
+
})
|
|
155
|
+
this.mentionable = mentionable
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Set the hoisted status of the role
|
|
160
|
+
*/
|
|
161
|
+
async setHoisted(guildId: string, hoisted: boolean) {
|
|
162
|
+
await this.client.rest.patch(Routes.guildRole(guildId, this.id), {
|
|
163
|
+
body: { hoist: hoisted }
|
|
164
|
+
})
|
|
165
|
+
this.hoisted = hoisted
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Set the position of the role
|
|
170
|
+
*/
|
|
171
|
+
async setPosition(guildId: string, position: number) {
|
|
172
|
+
await this.client.rest.patch(Routes.guildRole(guildId, this.id), {
|
|
173
|
+
body: { position }
|
|
174
|
+
})
|
|
175
|
+
this.position = position
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Set the permissions of the role
|
|
180
|
+
* @param permissions The permissions to set as a BitField string, until a better permission structure is implemented
|
|
181
|
+
*/
|
|
182
|
+
async setPermissions(guildId: string, permissions: string) {
|
|
183
|
+
await this.client.rest.patch(Routes.guildRole(guildId, this.id), {
|
|
184
|
+
body: { permissions }
|
|
185
|
+
})
|
|
186
|
+
this.permissions = permissions
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
async delete(guildId: string) {
|
|
190
|
+
await this.client.rest.delete(Routes.guildRole(guildId, this.id))
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Get the URL of the role's icon
|
|
195
|
+
*/
|
|
196
|
+
get iconUrl(): string | null {
|
|
197
|
+
return this.icon
|
|
198
|
+
? `https://cdn.discordapp.com/role-icons/${this.id}/${this.icon}.png`
|
|
199
|
+
: null
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type APIDMChannel,
|
|
3
|
+
type APIMessage,
|
|
4
|
+
type APIUser,
|
|
5
|
+
type RESTPostAPIChannelMessageJSONBody,
|
|
6
|
+
Routes,
|
|
7
|
+
type UserFlags
|
|
8
|
+
} from "discord-api-types/v10"
|
|
9
|
+
import { Base } from "../abstracts/Base.js"
|
|
10
|
+
import type { Client } from "../classes/Client.js"
|
|
11
|
+
import { Message } from "./Message.js"
|
|
12
|
+
|
|
13
|
+
export class User extends Base {
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the user
|
|
16
|
+
*/
|
|
17
|
+
id: string
|
|
18
|
+
/**
|
|
19
|
+
* The username of the user.
|
|
20
|
+
*/
|
|
21
|
+
username?: string
|
|
22
|
+
/**
|
|
23
|
+
* The global name of the user.
|
|
24
|
+
*/
|
|
25
|
+
globalName?: string | null
|
|
26
|
+
/**
|
|
27
|
+
* The discriminator of the user.
|
|
28
|
+
*/
|
|
29
|
+
discriminator?: string
|
|
30
|
+
/**
|
|
31
|
+
* The avatar hash of the user.
|
|
32
|
+
* You can use {@link User.avatarUrl} to get the URL of the avatar.
|
|
33
|
+
*/
|
|
34
|
+
avatar?: string | null
|
|
35
|
+
/**
|
|
36
|
+
* Is this user a bot?
|
|
37
|
+
*/
|
|
38
|
+
bot?: boolean
|
|
39
|
+
/**
|
|
40
|
+
* Is this user a system user?
|
|
41
|
+
*/
|
|
42
|
+
system?: boolean
|
|
43
|
+
/**
|
|
44
|
+
* The public flags of the user. (Bitfield)
|
|
45
|
+
* @see https://discord.com/developers/docs/resources/user#user-object-user-flags
|
|
46
|
+
*/
|
|
47
|
+
flags?: UserFlags
|
|
48
|
+
/**
|
|
49
|
+
* The banner hash of the user.
|
|
50
|
+
* You can use {@link User.bannerUrl} to get the URL of the banner.
|
|
51
|
+
*/
|
|
52
|
+
banner?: string | null
|
|
53
|
+
/**
|
|
54
|
+
* The accent color of the user.
|
|
55
|
+
*/
|
|
56
|
+
accentColor?: number | null
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Whether the user is a partial user (meaning it does not have all the data).
|
|
60
|
+
* If this is true, you should use {@link User.fetch} to get the full data of the user.
|
|
61
|
+
*/
|
|
62
|
+
partial: boolean
|
|
63
|
+
|
|
64
|
+
private rawData: APIUser | null = null
|
|
65
|
+
|
|
66
|
+
constructor(client: Client, rawDataOrId: APIUser | string) {
|
|
67
|
+
super(client)
|
|
68
|
+
if (typeof rawDataOrId === "string") {
|
|
69
|
+
this.id = rawDataOrId
|
|
70
|
+
this.partial = true
|
|
71
|
+
} else {
|
|
72
|
+
this.rawData = rawDataOrId
|
|
73
|
+
this.id = rawDataOrId.id
|
|
74
|
+
this.partial = false
|
|
75
|
+
this.setData(rawDataOrId)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
private setData(data: typeof this.rawData) {
|
|
80
|
+
if (!data) throw new Error("Cannot set data without having data... smh")
|
|
81
|
+
this.rawData = data
|
|
82
|
+
this.username = data.username
|
|
83
|
+
this.globalName = data.global_name
|
|
84
|
+
this.discriminator = data.discriminator
|
|
85
|
+
this.avatar = data.avatar
|
|
86
|
+
this.bot = data.bot
|
|
87
|
+
this.system = data.system
|
|
88
|
+
this.flags = data.public_flags
|
|
89
|
+
this.banner = data.banner
|
|
90
|
+
this.accentColor = data.accent_color
|
|
91
|
+
this.partial = false
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Fetch updated data for this user.
|
|
96
|
+
* If the user is partial, this will fetch all the data for the user and populate the fields.
|
|
97
|
+
* If the user is not partial, all fields will be updated with new values from Discord.
|
|
98
|
+
*/
|
|
99
|
+
async fetch() {
|
|
100
|
+
const newData = (await this.client.rest.get(
|
|
101
|
+
Routes.user(this.id)
|
|
102
|
+
)) as APIUser
|
|
103
|
+
if (!newData) throw new Error(`User ${this.id} not found`)
|
|
104
|
+
|
|
105
|
+
this.setData(newData)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Instantiate a new DM channel with this user.
|
|
110
|
+
*/
|
|
111
|
+
async createDm(userId: string) {
|
|
112
|
+
const dmChannel = (await this.client.rest.post(Routes.userChannels(), {
|
|
113
|
+
body: {
|
|
114
|
+
recipient_id: userId
|
|
115
|
+
}
|
|
116
|
+
})) as APIDMChannel
|
|
117
|
+
return dmChannel
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Send a message to this user.
|
|
122
|
+
*/
|
|
123
|
+
async send(data: RESTPostAPIChannelMessageJSONBody) {
|
|
124
|
+
const dmChannel = await this.createDm(this.id)
|
|
125
|
+
const message = (await this.client.rest.post(
|
|
126
|
+
Routes.channelMessages(dmChannel.id),
|
|
127
|
+
{
|
|
128
|
+
body: {
|
|
129
|
+
...data
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
)) as APIMessage
|
|
133
|
+
return new Message(this.client, message)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Get the URL of the user's avatar
|
|
138
|
+
*/
|
|
139
|
+
get avatarUrl(): string | null {
|
|
140
|
+
return this.avatar
|
|
141
|
+
? `https://cdn.discordapp.com/avatars/${this.id}/${this.avatar}.png`
|
|
142
|
+
: null
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Get the URL of the user's banner
|
|
147
|
+
*/
|
|
148
|
+
get bannerUrl(): string | null {
|
|
149
|
+
return this.banner
|
|
150
|
+
? `https://cdn.discordapp.com/banners/${this.id}/${this.banner}.png`
|
|
151
|
+
: null
|
|
152
|
+
}
|
|
153
|
+
}
|
package/src/utils.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const splitCustomId = (
|
|
2
|
+
customId: string
|
|
3
|
+
): [string, Record<string, string>] => {
|
|
4
|
+
const [id, ...args] = customId.split(":")
|
|
5
|
+
if (!id) throw new Error("Invalid custom ID was provided")
|
|
6
|
+
const data = Object.fromEntries(
|
|
7
|
+
args.map((arg) => {
|
|
8
|
+
const [key, value] = arg.split("=")
|
|
9
|
+
return [key, value]
|
|
10
|
+
})
|
|
11
|
+
)
|
|
12
|
+
return [id, data]
|
|
13
|
+
}
|
package/tsconfig.json
ADDED
package/typedoc.json
ADDED