@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.
Files changed (428) hide show
  1. package/.turbo/turbo-build.log +5 -0
  2. package/.turbo/turbo-dev.log +12 -0
  3. package/.turbo/turbo-docs.log +10 -0
  4. package/CHANGELOG.md +14 -0
  5. package/LICENSE +21 -0
  6. package/README.md +45 -0
  7. package/dist/package.json +18 -0
  8. package/dist/src/abstracts/AnySelectMenu.d.ts +31 -0
  9. package/dist/src/abstracts/AnySelectMenu.d.ts.map +1 -0
  10. package/dist/src/abstracts/AnySelectMenu.js +19 -0
  11. package/dist/src/abstracts/AnySelectMenu.js.map +1 -0
  12. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts +12 -0
  13. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts.map +1 -0
  14. package/dist/src/abstracts/AnySelectMenuInteraction.js +21 -0
  15. package/dist/src/abstracts/AnySelectMenuInteraction.js.map +1 -0
  16. package/dist/src/abstracts/Base.d.ts +10 -0
  17. package/dist/src/abstracts/Base.d.ts.map +1 -0
  18. package/dist/src/abstracts/Base.js +11 -0
  19. package/dist/src/abstracts/Base.js.map +1 -0
  20. package/dist/src/abstracts/BaseChannel.d.ts +44 -0
  21. package/dist/src/abstracts/BaseChannel.d.ts.map +1 -0
  22. package/dist/src/abstracts/BaseChannel.js +58 -0
  23. package/dist/src/abstracts/BaseChannel.js.map +1 -0
  24. package/dist/src/abstracts/BaseCommand.d.ts +58 -0
  25. package/dist/src/abstracts/BaseCommand.d.ts.map +1 -0
  26. package/dist/src/abstracts/BaseCommand.js +69 -0
  27. package/dist/src/abstracts/BaseCommand.js.map +1 -0
  28. package/dist/src/abstracts/BaseComponent.d.ts +34 -0
  29. package/dist/src/abstracts/BaseComponent.d.ts.map +1 -0
  30. package/dist/src/abstracts/BaseComponent.js +30 -0
  31. package/dist/src/abstracts/BaseComponent.js.map +1 -0
  32. package/dist/src/abstracts/BaseComponentInteraction.d.ts +9 -0
  33. package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -0
  34. package/dist/src/abstracts/BaseComponentInteraction.js +14 -0
  35. package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -0
  36. package/dist/src/abstracts/BaseGuildChannel.d.ts +68 -0
  37. package/dist/src/abstracts/BaseGuildChannel.d.ts.map +1 -0
  38. package/dist/src/abstracts/BaseGuildChannel.js +130 -0
  39. package/dist/src/abstracts/BaseGuildChannel.js.map +1 -0
  40. package/dist/src/abstracts/BaseGuildTextChannel.d.ts +42 -0
  41. package/dist/src/abstracts/BaseGuildTextChannel.d.ts.map +1 -0
  42. package/dist/src/abstracts/BaseGuildTextChannel.js +61 -0
  43. package/dist/src/abstracts/BaseGuildTextChannel.js.map +1 -0
  44. package/dist/src/abstracts/BaseInteraction.d.ts +87 -0
  45. package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -0
  46. package/dist/src/abstracts/BaseInteraction.js +101 -0
  47. package/dist/src/abstracts/BaseInteraction.js.map +1 -0
  48. package/dist/src/abstracts/ButtonInteraction.d.ts +8 -0
  49. package/dist/src/abstracts/ButtonInteraction.d.ts.map +1 -0
  50. package/dist/src/abstracts/ButtonInteraction.js +18 -0
  51. package/dist/src/abstracts/ButtonInteraction.js.map +1 -0
  52. package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts +7 -0
  53. package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts.map +1 -0
  54. package/dist/src/abstracts/ChannelSelectMenuInteraction.js +11 -0
  55. package/dist/src/abstracts/ChannelSelectMenuInteraction.js.map +1 -0
  56. package/dist/src/abstracts/CommandHandler.d.ts +6 -0
  57. package/dist/src/abstracts/CommandHandler.d.ts.map +1 -0
  58. package/dist/src/abstracts/CommandHandler.js +65 -0
  59. package/dist/src/abstracts/CommandHandler.js.map +1 -0
  60. package/dist/src/abstracts/CommandInteraction.d.ts +15 -0
  61. package/dist/src/abstracts/CommandInteraction.d.ts.map +1 -0
  62. package/dist/src/abstracts/CommandInteraction.js +60 -0
  63. package/dist/src/abstracts/CommandInteraction.js.map +1 -0
  64. package/dist/src/abstracts/ComponentHandler.d.ts +6 -0
  65. package/dist/src/abstracts/ComponentHandler.d.ts.map +1 -0
  66. package/dist/src/abstracts/ComponentHandler.js +64 -0
  67. package/dist/src/abstracts/ComponentHandler.js.map +1 -0
  68. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts +42 -0
  69. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts.map +1 -0
  70. package/dist/src/abstracts/GuildThreadOnlyChannel.js +54 -0
  71. package/dist/src/abstracts/GuildThreadOnlyChannel.js.map +1 -0
  72. package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts +8 -0
  73. package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts.map +1 -0
  74. package/dist/src/abstracts/MentionableSelectMenuInteraction.js +15 -0
  75. package/dist/src/abstracts/MentionableSelectMenuInteraction.js.map +1 -0
  76. package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts +8 -0
  77. package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts.map +1 -0
  78. package/dist/src/abstracts/RoleSelectMenuInteraction.js +14 -0
  79. package/dist/src/abstracts/RoleSelectMenuInteraction.js.map +1 -0
  80. package/dist/src/abstracts/StringSelectMenuInteraction.d.ts +8 -0
  81. package/dist/src/abstracts/StringSelectMenuInteraction.d.ts.map +1 -0
  82. package/dist/src/abstracts/StringSelectMenuInteraction.js +14 -0
  83. package/dist/src/abstracts/StringSelectMenuInteraction.js.map +1 -0
  84. package/dist/src/abstracts/UserSelectMenuInteraction.d.ts +8 -0
  85. package/dist/src/abstracts/UserSelectMenuInteraction.d.ts.map +1 -0
  86. package/dist/src/abstracts/UserSelectMenuInteraction.js +14 -0
  87. package/dist/src/abstracts/UserSelectMenuInteraction.js.map +1 -0
  88. package/dist/src/classes/Button.d.ts +53 -0
  89. package/dist/src/classes/Button.d.ts.map +1 -0
  90. package/dist/src/classes/Button.js +55 -0
  91. package/dist/src/classes/Button.js.map +1 -0
  92. package/dist/src/classes/ChannelSelectMenu.d.ts +15 -0
  93. package/dist/src/classes/ChannelSelectMenu.d.ts.map +1 -0
  94. package/dist/src/classes/ChannelSelectMenu.js +15 -0
  95. package/dist/src/classes/ChannelSelectMenu.js.map +1 -0
  96. package/dist/src/classes/Client.d.ts +117 -0
  97. package/dist/src/classes/Client.d.ts.map +1 -0
  98. package/dist/src/classes/Client.js +170 -0
  99. package/dist/src/classes/Client.js.map +1 -0
  100. package/dist/src/classes/Command.d.ts +35 -0
  101. package/dist/src/classes/Command.d.ts.map +1 -0
  102. package/dist/src/classes/Command.js +31 -0
  103. package/dist/src/classes/Command.js.map +1 -0
  104. package/dist/src/classes/CommandWithSubcommandGroups.d.ts +22 -0
  105. package/dist/src/classes/CommandWithSubcommandGroups.d.ts.map +1 -0
  106. package/dist/src/classes/CommandWithSubcommandGroups.js +31 -0
  107. package/dist/src/classes/CommandWithSubcommandGroups.js.map +1 -0
  108. package/dist/src/classes/CommandWithSubcommands.d.ts +19 -0
  109. package/dist/src/classes/CommandWithSubcommands.d.ts.map +1 -0
  110. package/dist/src/classes/CommandWithSubcommands.js +21 -0
  111. package/dist/src/classes/CommandWithSubcommands.js.map +1 -0
  112. package/dist/src/classes/MentionableSelectMenu.d.ts +13 -0
  113. package/dist/src/classes/MentionableSelectMenu.d.ts.map +1 -0
  114. package/dist/src/classes/MentionableSelectMenu.js +13 -0
  115. package/dist/src/classes/MentionableSelectMenu.js.map +1 -0
  116. package/dist/src/classes/Paginator.d.ts +3 -0
  117. package/dist/src/classes/Paginator.d.ts.map +1 -0
  118. package/dist/src/classes/Paginator.js +3 -0
  119. package/dist/src/classes/Paginator.js.map +1 -0
  120. package/dist/src/classes/RoleSelectMenu.d.ts +13 -0
  121. package/dist/src/classes/RoleSelectMenu.d.ts.map +1 -0
  122. package/dist/src/classes/RoleSelectMenu.js +13 -0
  123. package/dist/src/classes/RoleSelectMenu.js.map +1 -0
  124. package/dist/src/classes/Row.d.ts +27 -0
  125. package/dist/src/classes/Row.d.ts.map +1 -0
  126. package/dist/src/classes/Row.js +39 -0
  127. package/dist/src/classes/Row.js.map +1 -0
  128. package/dist/src/classes/StringSelectMenu.d.ts +13 -0
  129. package/dist/src/classes/StringSelectMenu.d.ts.map +1 -0
  130. package/dist/src/classes/StringSelectMenu.js +12 -0
  131. package/dist/src/classes/StringSelectMenu.js.map +1 -0
  132. package/dist/src/classes/UserSelectMenu.d.ts +13 -0
  133. package/dist/src/classes/UserSelectMenu.d.ts.map +1 -0
  134. package/dist/src/classes/UserSelectMenu.js +13 -0
  135. package/dist/src/classes/UserSelectMenu.js.map +1 -0
  136. package/dist/src/factories/channelFactory.d.ts +13 -0
  137. package/dist/src/factories/channelFactory.d.ts.map +1 -0
  138. package/dist/src/factories/channelFactory.js +39 -0
  139. package/dist/src/factories/channelFactory.js.map +1 -0
  140. package/dist/src/index.d.ts +49 -0
  141. package/dist/src/index.d.ts.map +1 -0
  142. package/dist/src/index.js +55 -0
  143. package/dist/src/index.js.map +1 -0
  144. package/dist/src/internals/AutocompleteInteraction.d.ts +34 -0
  145. package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -0
  146. package/dist/src/internals/AutocompleteInteraction.js +68 -0
  147. package/dist/src/internals/AutocompleteInteraction.js.map +1 -0
  148. package/dist/src/internals/ButtonInteraction.d.ts +8 -0
  149. package/dist/src/internals/ButtonInteraction.d.ts.map +1 -0
  150. package/dist/src/internals/ButtonInteraction.js +18 -0
  151. package/dist/src/internals/ButtonInteraction.js.map +1 -0
  152. package/dist/src/internals/ChannelSelectMenuInteraction.d.ts +7 -0
  153. package/dist/src/internals/ChannelSelectMenuInteraction.d.ts.map +1 -0
  154. package/dist/src/internals/ChannelSelectMenuInteraction.js +11 -0
  155. package/dist/src/internals/ChannelSelectMenuInteraction.js.map +1 -0
  156. package/dist/src/internals/CommandHandler.d.ts +8 -0
  157. package/dist/src/internals/CommandHandler.d.ts.map +1 -0
  158. package/dist/src/internals/CommandHandler.js +81 -0
  159. package/dist/src/internals/CommandHandler.js.map +1 -0
  160. package/dist/src/internals/CommandInteraction.d.ts +17 -0
  161. package/dist/src/internals/CommandInteraction.d.ts.map +1 -0
  162. package/dist/src/internals/CommandInteraction.js +29 -0
  163. package/dist/src/internals/CommandInteraction.js.map +1 -0
  164. package/dist/src/internals/ComponentHandler.d.ts +6 -0
  165. package/dist/src/internals/ComponentHandler.d.ts.map +1 -0
  166. package/dist/src/internals/ComponentHandler.js +64 -0
  167. package/dist/src/internals/ComponentHandler.js.map +1 -0
  168. package/dist/src/internals/MentionableSelectMenuInteraction.d.ts +8 -0
  169. package/dist/src/internals/MentionableSelectMenuInteraction.d.ts.map +1 -0
  170. package/dist/src/internals/MentionableSelectMenuInteraction.js +15 -0
  171. package/dist/src/internals/MentionableSelectMenuInteraction.js.map +1 -0
  172. package/dist/src/internals/OptionsHandler.d.ts +70 -0
  173. package/dist/src/internals/OptionsHandler.d.ts.map +1 -0
  174. package/dist/src/internals/OptionsHandler.js +115 -0
  175. package/dist/src/internals/OptionsHandler.js.map +1 -0
  176. package/dist/src/internals/RoleSelectMenuInteraction.d.ts +8 -0
  177. package/dist/src/internals/RoleSelectMenuInteraction.d.ts.map +1 -0
  178. package/dist/src/internals/RoleSelectMenuInteraction.js +14 -0
  179. package/dist/src/internals/RoleSelectMenuInteraction.js.map +1 -0
  180. package/dist/src/internals/StringSelectMenuInteraction.d.ts +8 -0
  181. package/dist/src/internals/StringSelectMenuInteraction.d.ts.map +1 -0
  182. package/dist/src/internals/StringSelectMenuInteraction.js +14 -0
  183. package/dist/src/internals/StringSelectMenuInteraction.js.map +1 -0
  184. package/dist/src/internals/UserSelectMenuInteraction.d.ts +8 -0
  185. package/dist/src/internals/UserSelectMenuInteraction.d.ts.map +1 -0
  186. package/dist/src/internals/UserSelectMenuInteraction.js +14 -0
  187. package/dist/src/internals/UserSelectMenuInteraction.js.map +1 -0
  188. package/dist/src/structures/AnySelectMenu.d.ts +31 -0
  189. package/dist/src/structures/AnySelectMenu.d.ts.map +1 -0
  190. package/dist/src/structures/AnySelectMenu.js +19 -0
  191. package/dist/src/structures/AnySelectMenu.js.map +1 -0
  192. package/dist/src/structures/AnySelectMenuInteraction.d.ts +12 -0
  193. package/dist/src/structures/AnySelectMenuInteraction.d.ts.map +1 -0
  194. package/dist/src/structures/AnySelectMenuInteraction.js +21 -0
  195. package/dist/src/structures/AnySelectMenuInteraction.js.map +1 -0
  196. package/dist/src/structures/Base.d.ts +10 -0
  197. package/dist/src/structures/Base.d.ts.map +1 -0
  198. package/dist/src/structures/Base.js +11 -0
  199. package/dist/src/structures/Base.js.map +1 -0
  200. package/dist/src/structures/BaseCommand.d.ts +64 -0
  201. package/dist/src/structures/BaseCommand.d.ts.map +1 -0
  202. package/dist/src/structures/BaseCommand.js +58 -0
  203. package/dist/src/structures/BaseCommand.js.map +1 -0
  204. package/dist/src/structures/BaseComponent.d.ts +34 -0
  205. package/dist/src/structures/BaseComponent.d.ts.map +1 -0
  206. package/dist/src/structures/BaseComponent.js +30 -0
  207. package/dist/src/structures/BaseComponent.js.map +1 -0
  208. package/dist/src/structures/BaseComponentInteraction.d.ts +9 -0
  209. package/dist/src/structures/BaseComponentInteraction.d.ts.map +1 -0
  210. package/dist/src/structures/BaseComponentInteraction.js +14 -0
  211. package/dist/src/structures/BaseComponentInteraction.js.map +1 -0
  212. package/dist/src/structures/BaseInteraction.d.ts +81 -0
  213. package/dist/src/structures/BaseInteraction.d.ts.map +1 -0
  214. package/dist/src/structures/BaseInteraction.js +99 -0
  215. package/dist/src/structures/BaseInteraction.js.map +1 -0
  216. package/dist/src/structures/ButtonInteraction.d.ts +8 -0
  217. package/dist/src/structures/ButtonInteraction.d.ts.map +1 -0
  218. package/dist/src/structures/ButtonInteraction.js +18 -0
  219. package/dist/src/structures/ButtonInteraction.js.map +1 -0
  220. package/dist/src/structures/ChannelSelectMenuInteraction.d.ts +7 -0
  221. package/dist/src/structures/ChannelSelectMenuInteraction.d.ts.map +1 -0
  222. package/dist/src/structures/ChannelSelectMenuInteraction.js +11 -0
  223. package/dist/src/structures/ChannelSelectMenuInteraction.js.map +1 -0
  224. package/dist/src/structures/CommandHandler.d.ts +6 -0
  225. package/dist/src/structures/CommandHandler.d.ts.map +1 -0
  226. package/dist/src/structures/CommandHandler.js +70 -0
  227. package/dist/src/structures/CommandHandler.js.map +1 -0
  228. package/dist/src/structures/CommandInteraction.d.ts +15 -0
  229. package/dist/src/structures/CommandInteraction.d.ts.map +1 -0
  230. package/dist/src/structures/CommandInteraction.js +60 -0
  231. package/dist/src/structures/CommandInteraction.js.map +1 -0
  232. package/dist/src/structures/ComponentHandler.d.ts +6 -0
  233. package/dist/src/structures/ComponentHandler.d.ts.map +1 -0
  234. package/dist/src/structures/ComponentHandler.js +64 -0
  235. package/dist/src/structures/ComponentHandler.js.map +1 -0
  236. package/dist/src/structures/DmChannel.d.ts +18 -0
  237. package/dist/src/structures/DmChannel.d.ts.map +1 -0
  238. package/dist/src/structures/DmChannel.js +24 -0
  239. package/dist/src/structures/DmChannel.js.map +1 -0
  240. package/dist/src/structures/GroupDmChannel.d.ts +67 -0
  241. package/dist/src/structures/GroupDmChannel.d.ts.map +1 -0
  242. package/dist/src/structures/GroupDmChannel.js +109 -0
  243. package/dist/src/structures/GroupDmChannel.js.map +1 -0
  244. package/dist/src/structures/Guild.d.ts +71 -0
  245. package/dist/src/structures/Guild.d.ts.map +1 -0
  246. package/dist/src/structures/Guild.js +123 -0
  247. package/dist/src/structures/Guild.js.map +1 -0
  248. package/dist/src/structures/GuildAnnouncementChannel.d.ts +12 -0
  249. package/dist/src/structures/GuildAnnouncementChannel.d.ts.map +1 -0
  250. package/dist/src/structures/GuildAnnouncementChannel.js +17 -0
  251. package/dist/src/structures/GuildAnnouncementChannel.js.map +1 -0
  252. package/dist/src/structures/GuildCategoryChannel.d.ts +13 -0
  253. package/dist/src/structures/GuildCategoryChannel.d.ts.map +1 -0
  254. package/dist/src/structures/GuildCategoryChannel.js +14 -0
  255. package/dist/src/structures/GuildCategoryChannel.js.map +1 -0
  256. package/dist/src/structures/GuildForumChannel.d.ts +13 -0
  257. package/dist/src/structures/GuildForumChannel.d.ts.map +1 -0
  258. package/dist/src/structures/GuildForumChannel.js +14 -0
  259. package/dist/src/structures/GuildForumChannel.js.map +1 -0
  260. package/dist/src/structures/GuildMediaChannel.d.ts +13 -0
  261. package/dist/src/structures/GuildMediaChannel.d.ts.map +1 -0
  262. package/dist/src/structures/GuildMediaChannel.js +12 -0
  263. package/dist/src/structures/GuildMediaChannel.js.map +1 -0
  264. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts +30 -0
  265. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts.map +1 -0
  266. package/dist/src/structures/GuildStageOrVoiceChannel.js +34 -0
  267. package/dist/src/structures/GuildStageOrVoiceChannel.js.map +1 -0
  268. package/dist/src/structures/GuildTextChannel.d.ts +15 -0
  269. package/dist/src/structures/GuildTextChannel.d.ts.map +1 -0
  270. package/dist/src/structures/GuildTextChannel.js +18 -0
  271. package/dist/src/structures/GuildTextChannel.js.map +1 -0
  272. package/dist/src/structures/GuildThreadChannel.d.ts +89 -0
  273. package/dist/src/structures/GuildThreadChannel.d.ts.map +1 -0
  274. package/dist/src/structures/GuildThreadChannel.js +134 -0
  275. package/dist/src/structures/GuildThreadChannel.js.map +1 -0
  276. package/dist/src/structures/MentionableSelectMenuInteraction.d.ts +8 -0
  277. package/dist/src/structures/MentionableSelectMenuInteraction.d.ts.map +1 -0
  278. package/dist/src/structures/MentionableSelectMenuInteraction.js +15 -0
  279. package/dist/src/structures/MentionableSelectMenuInteraction.js.map +1 -0
  280. package/dist/src/structures/Message.d.ts +52 -0
  281. package/dist/src/structures/Message.d.ts.map +1 -0
  282. package/dist/src/structures/Message.js +93 -0
  283. package/dist/src/structures/Message.js.map +1 -0
  284. package/dist/src/structures/Role.d.ts +106 -0
  285. package/dist/src/structures/Role.d.ts.map +1 -0
  286. package/dist/src/structures/Role.js +181 -0
  287. package/dist/src/structures/Role.js.map +1 -0
  288. package/dist/src/structures/RoleSelectMenuInteraction.d.ts +8 -0
  289. package/dist/src/structures/RoleSelectMenuInteraction.d.ts.map +1 -0
  290. package/dist/src/structures/RoleSelectMenuInteraction.js +14 -0
  291. package/dist/src/structures/RoleSelectMenuInteraction.js.map +1 -0
  292. package/dist/src/structures/StringSelectMenuInteraction.d.ts +8 -0
  293. package/dist/src/structures/StringSelectMenuInteraction.d.ts.map +1 -0
  294. package/dist/src/structures/StringSelectMenuInteraction.js +14 -0
  295. package/dist/src/structures/StringSelectMenuInteraction.js.map +1 -0
  296. package/dist/src/structures/User.d.ts +80 -0
  297. package/dist/src/structures/User.d.ts.map +1 -0
  298. package/dist/src/structures/User.js +133 -0
  299. package/dist/src/structures/User.js.map +1 -0
  300. package/dist/src/structures/UserSelectMenuInteraction.d.ts +8 -0
  301. package/dist/src/structures/UserSelectMenuInteraction.d.ts.map +1 -0
  302. package/dist/src/structures/UserSelectMenuInteraction.js +14 -0
  303. package/dist/src/structures/UserSelectMenuInteraction.js.map +1 -0
  304. package/dist/src/types.d.ts +31 -0
  305. package/dist/src/types.d.ts.map +1 -0
  306. package/dist/src/types.js +33 -0
  307. package/dist/src/types.js.map +1 -0
  308. package/dist/src/utils.d.ts +2 -0
  309. package/dist/src/utils.d.ts.map +1 -0
  310. package/dist/src/utils.js +11 -0
  311. package/dist/src/utils.js.map +1 -0
  312. package/dist/tsconfig.tsbuildinfo +1 -0
  313. package/docs/classes/AnySelectMenu.mdx +114 -0
  314. package/docs/classes/AnySelectMenuInteraction.mdx +161 -0
  315. package/docs/classes/AutocompleteInteraction.mdx +152 -0
  316. package/docs/classes/AutocompleteOptionsHandler.mdx +243 -0
  317. package/docs/classes/BaseChannel.mdx +97 -0
  318. package/docs/classes/BaseCommand.mdx +61 -0
  319. package/docs/classes/BaseComponent.mdx +55 -0
  320. package/docs/classes/BaseComponentInteraction.mdx +146 -0
  321. package/docs/classes/BaseGuildChannel.mdx +262 -0
  322. package/docs/classes/BaseGuildTextChannel.mdx +360 -0
  323. package/docs/classes/BaseInteraction.mdx +127 -0
  324. package/docs/classes/Button.mdx +99 -0
  325. package/docs/classes/ButtonInteraction.mdx +141 -0
  326. package/docs/classes/ChannelSelectMenu.mdx +122 -0
  327. package/docs/classes/ChannelSelectMenuInteraction.mdx +157 -0
  328. package/docs/classes/Client.mdx +48 -0
  329. package/docs/classes/Command.mdx +111 -0
  330. package/docs/classes/CommandHandler.mdx +65 -0
  331. package/docs/classes/CommandInteraction.mdx +141 -0
  332. package/docs/classes/CommandWithSubcommandGroups.mdx +73 -0
  333. package/docs/classes/CommandWithSubcommands.mdx +76 -0
  334. package/docs/classes/ComponentHandler.mdx +49 -0
  335. package/docs/classes/DmChannel.mdx +118 -0
  336. package/docs/classes/GroupDmChannel.mdx +197 -0
  337. package/docs/classes/Guild.mdx +139 -0
  338. package/docs/classes/GuildAnnouncementChannel.mdx +377 -0
  339. package/docs/classes/GuildCategoryChannel.mdx +272 -0
  340. package/docs/classes/GuildForumChannel.mdx +333 -0
  341. package/docs/classes/GuildMediaChannel.mdx +327 -0
  342. package/docs/classes/GuildStageChannel.mdx +276 -0
  343. package/docs/classes/GuildStageOrVoiceChannel.mdx +292 -0
  344. package/docs/classes/GuildTextChannel.mdx +367 -0
  345. package/docs/classes/GuildThreadChannel.mdx +425 -0
  346. package/docs/classes/GuildThreadOnlyChannel.mdx +333 -0
  347. package/docs/classes/GuildVoiceChannel.mdx +276 -0
  348. package/docs/classes/LinkButton.mdx +84 -0
  349. package/docs/classes/MentionableSelectMenu.mdx +120 -0
  350. package/docs/classes/MentionableSelectMenuInteraction.mdx +157 -0
  351. package/docs/classes/Message.mdx +126 -0
  352. package/docs/classes/OptionsHandler.mdx +203 -0
  353. package/docs/classes/PremiumButton.mdx +84 -0
  354. package/docs/classes/Role.mdx +228 -0
  355. package/docs/classes/RoleSelectMenu.mdx +120 -0
  356. package/docs/classes/RoleSelectMenuInteraction.mdx +157 -0
  357. package/docs/classes/Row.mdx +88 -0
  358. package/docs/classes/StringSelectMenu.mdx +120 -0
  359. package/docs/classes/StringSelectMenuInteraction.mdx +157 -0
  360. package/docs/classes/User.mdx +119 -0
  361. package/docs/classes/UserSelectMenu.mdx +120 -0
  362. package/docs/classes/UserSelectMenuInteraction.mdx +157 -0
  363. package/docs/enumerations/ClientMode.mdx +16 -0
  364. package/docs/functions/channelFactory.mdx +16 -0
  365. package/docs/index.mdx +83 -0
  366. package/docs/type-aliases/AnySelectMenuComponentType.mdx +5 -0
  367. package/docs/type-aliases/ClientOptions.mdx +20 -0
  368. package/docs/type-aliases/CommandOptions.mdx +5 -0
  369. package/docs/type-aliases/ComponentAdditionalData.mdx +9 -0
  370. package/docs/type-aliases/InteractionFileData.mdx +15 -0
  371. package/docs/type-aliases/InteractionReplyData.mdx +14 -0
  372. package/docs/type-aliases/InteractionReplyOptions.mdx +13 -0
  373. package/docs/type-aliases/RawOptions.mdx +9 -0
  374. package/docs/type-aliases/meta.json +3 -0
  375. package/package.json +18 -0
  376. package/src/README.md +7 -0
  377. package/src/abstracts/AnySelectMenu.ts +63 -0
  378. package/src/abstracts/AnySelectMenuInteraction.ts +29 -0
  379. package/src/abstracts/Base.ts +12 -0
  380. package/src/abstracts/BaseChannel.ts +73 -0
  381. package/src/abstracts/BaseCommand.ts +95 -0
  382. package/src/abstracts/BaseComponent.ts +49 -0
  383. package/src/abstracts/BaseComponentInteraction.ts +19 -0
  384. package/src/abstracts/BaseGuildChannel.ts +152 -0
  385. package/src/abstracts/BaseGuildTextChannel.ts +77 -0
  386. package/src/abstracts/BaseInteraction.ts +170 -0
  387. package/src/abstracts/GuildThreadOnlyChannel.ts +71 -0
  388. package/src/classes/Button.ts +95 -0
  389. package/src/classes/ChannelSelectMenu.ts +21 -0
  390. package/src/classes/Client.ts +249 -0
  391. package/src/classes/Command.ts +51 -0
  392. package/src/classes/CommandWithSubcommandGroups.ts +47 -0
  393. package/src/classes/CommandWithSubcommands.ts +35 -0
  394. package/src/classes/MentionableSelectMenu.ts +19 -0
  395. package/src/classes/RoleSelectMenu.ts +19 -0
  396. package/src/classes/Row.ts +44 -0
  397. package/src/classes/StringSelectMenu.ts +19 -0
  398. package/src/classes/UserSelectMenu.ts +19 -0
  399. package/src/factories/channelFactory.ts +43 -0
  400. package/src/index.ts +59 -0
  401. package/src/internals/AutocompleteInteraction.ts +107 -0
  402. package/src/internals/ButtonInteraction.ts +26 -0
  403. package/src/internals/ChannelSelectMenuInteraction.ts +15 -0
  404. package/src/internals/CommandHandler.ts +123 -0
  405. package/src/internals/CommandInteraction.ts +49 -0
  406. package/src/internals/ComponentHandler.ts +81 -0
  407. package/src/internals/MentionableSelectMenuInteraction.ts +21 -0
  408. package/src/internals/OptionsHandler.ts +147 -0
  409. package/src/internals/RoleSelectMenuInteraction.ts +20 -0
  410. package/src/internals/StringSelectMenuInteraction.ts +20 -0
  411. package/src/internals/UserSelectMenuInteraction.ts +20 -0
  412. package/src/structures/DmChannel.ts +31 -0
  413. package/src/structures/GroupDmChannel.ts +132 -0
  414. package/src/structures/Guild.ts +142 -0
  415. package/src/structures/GuildAnnouncementChannel.ts +20 -0
  416. package/src/structures/GuildCategoryChannel.ts +16 -0
  417. package/src/structures/GuildForumChannel.ts +20 -0
  418. package/src/structures/GuildMediaChannel.ts +13 -0
  419. package/src/structures/GuildStageOrVoiceChannel.ts +46 -0
  420. package/src/structures/GuildTextChannel.ts +21 -0
  421. package/src/structures/GuildThreadChannel.ts +150 -0
  422. package/src/structures/Message.ts +124 -0
  423. package/src/structures/Role.ts +201 -0
  424. package/src/structures/User.ts +153 -0
  425. package/src/utils.ts +13 -0
  426. package/tests/index.test.ts +4 -0
  427. package/tsconfig.json +12 -0
  428. package/typedoc.json +9 -0
@@ -0,0 +1,15 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { AnySelectMenu } from "../abstracts/AnySelectMenu.js";
3
+ export class ChannelSelectMenu extends AnySelectMenu {
4
+ type = ComponentType.ChannelSelect;
5
+ channelTypes;
6
+ defaultValues;
7
+ serializeOptions() {
8
+ return {
9
+ type: this.type,
10
+ default_values: this.defaultValues,
11
+ channel_types: this.channelTypes
12
+ };
13
+ }
14
+ }
15
+ //# sourceMappingURL=ChannelSelectMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChannelSelectMenu.js","sourceRoot":"","sources":["../../../src/classes/ChannelSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAG7D,MAAM,OAAgB,iBAAkB,SAAQ,aAAa;IAC5D,IAAI,GAAgC,aAAa,CAAC,aAAa,CAAA;IAC/D,YAAY,CAA6C;IACzD,aAAa,CAA8C;IAG3D,gBAAgB;QACf,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,aAAa;YAClC,aAAa,EAAE,IAAI,CAAC,YAAY;SAChC,CAAA;IACF,CAAC;CACD"}
@@ -0,0 +1,117 @@
1
+ import { RequestClient, type RequestClientOptions } from "@buape/carbon-request";
2
+ import { AutoRouter, type IRequestStrict } from "itty-router";
3
+ import type { BaseCommand } from "../abstracts/BaseCommand.js";
4
+ import { CommandHandler } from "../internals/CommandHandler.js";
5
+ import { ComponentHandler } from "../internals/ComponentHandler.js";
6
+ /**
7
+ * The mode that the client is running in.
8
+ * Different platforms have different requirements for how processes are handled.
9
+ */
10
+ export declare enum ClientMode {
11
+ NodeJS = "node",
12
+ CloudflareWorkers = "cloudflare",
13
+ Bun = "bun",
14
+ Vercel = "vercel",
15
+ Web = "web"
16
+ }
17
+ /**
18
+ * The options used for initializing the client
19
+ */
20
+ export type ClientOptions = {
21
+ /**
22
+ * If you want to have the root route for the interaction handler redirect to a different URL, you can set this.
23
+ */
24
+ redirectUrl?: string;
25
+ /**
26
+ * The client ID of the bot
27
+ */
28
+ clientId: string;
29
+ /**
30
+ * The public key of the bot, used for interaction verification
31
+ */
32
+ publicKey: string;
33
+ /**
34
+ * The token of the bot
35
+ */
36
+ token: string;
37
+ /**
38
+ * The mode of the client, generally where you are hosting the bot. If you have a different mode for your local development, make sure to set it to the local one.
39
+ * @example
40
+ * ```ts
41
+ * import { Client, ClientMode } from "@buape/carbon"
42
+ *
43
+ * const client = new Client({
44
+ * clientId: "12345678901234567890",
45
+ * publicKey: "c1a2f941ae8ce6d776f7704d0bb3d46b863e21fda491cdb2bdba6b8bc5fe7269",
46
+ * token: "MTA4NjEwNTYxMDUxMDE1NTg1Nw.GNt-U8.OSHy-g-5FlfESnu3Z9MEEMJLHiRthXajiXNwiE",
47
+ * mode: process.env.NODE_ENV === "development" ? ClientMode.NodeJS : ClientMode.CloudflareWorkers
48
+ * })
49
+ * ```
50
+ */
51
+ mode: ClientMode;
52
+ /**
53
+ * The options used to initialize the request client, if you want to customize it.
54
+ */
55
+ requestOptions?: RequestClientOptions;
56
+ /**
57
+ * The port to run the server on, if you are using {@link ClientMode.Bun} mode.
58
+ */
59
+ port?: number;
60
+ /**
61
+ * Whether the commands should be deployed to Discord automatically.
62
+ */
63
+ autoDeploy?: boolean;
64
+ };
65
+ /**
66
+ * The main client used to interact with Discord
67
+ */
68
+ export declare class Client {
69
+ /**
70
+ * The options used to initialize the client
71
+ */
72
+ options: ClientOptions;
73
+ /**
74
+ * The commands that the client has registered
75
+ */
76
+ commands: BaseCommand[];
77
+ /**
78
+ * The router used to handle requests
79
+ */
80
+ router: ReturnType<typeof AutoRouter<IRequestStrict>>;
81
+ /**
82
+ * The rest client used to interact with the Discord API
83
+ */
84
+ rest: RequestClient;
85
+ /**
86
+ * The handler for the component interactions sent from Discord
87
+ */
88
+ componentHandler: ComponentHandler;
89
+ commandHandler: CommandHandler;
90
+ /**
91
+ * Creates a new client
92
+ * @param options The options used to initialize the client
93
+ * @param commands The commands that the client has registered
94
+ */
95
+ constructor(options: ClientOptions, commands: BaseCommand[]);
96
+ /**
97
+ * Deploy the commands registered to Discord.
98
+ * This is automatically called when running in NodeJS mode.
99
+ */
100
+ deployCommands(): Promise<void>;
101
+ /**
102
+ * Setup the routes for the client
103
+ */
104
+ private setupRoutes;
105
+ /**
106
+ * Validate the interaction request
107
+ * @param req The request to validate
108
+ */
109
+ private validateInteraction;
110
+ }
111
+ /**
112
+ * @hidden
113
+ */
114
+ export interface ExecutionContext {
115
+ waitUntil(promise: Promise<any>): void;
116
+ }
117
+ //# sourceMappingURL=Client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/classes/Client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAQhF,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAqB,MAAM,aAAa,CAAA;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;;GAGG;AACH,oBAAY,UAAU;IACrB,MAAM,SAAS;IACf,iBAAiB,eAAe;IAChC,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,GAAG,QAAQ;CACX;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;;;;;;;;OAaG;IACH,IAAI,EAAE,UAAU,CAAA;IAChB;;OAEG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAA;IACrC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;GAEG;AACH,qBAAa,MAAM;IAClB;;OAEG;IACH,OAAO,EAAE,aAAa,CAAA;IACtB;;OAEG;IACH,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAA;IACrD;;OAEG;IACH,IAAI,EAAE,aAAa,CAAA;IACnB;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,cAAc,EAAE,cAAc,CAAA;IAE9B;;;;OAIG;gBACS,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE;IAmB3D;;;OAGG;IACG,cAAc;IAepB;;OAEG;IACH,OAAO,CAAC,WAAW;IAyEnB;;;OAGG;YACW,mBAAmB;CAiBjC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAEhC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;CACtC"}
@@ -0,0 +1,170 @@
1
+ import { RequestClient } from "@buape/carbon-request";
2
+ import { InteractionResponseType, InteractionType, Routes } from "discord-api-types/v10";
3
+ import { PlatformAlgorithm, isValidRequest } from "discord-verify";
4
+ import { AutoRouter, StatusError, json } from "itty-router";
5
+ import { CommandHandler } from "../internals/CommandHandler.js";
6
+ import { ComponentHandler } from "../internals/ComponentHandler.js";
7
+ /**
8
+ * The mode that the client is running in.
9
+ * Different platforms have different requirements for how processes are handled.
10
+ */
11
+ export var ClientMode;
12
+ (function (ClientMode) {
13
+ ClientMode["NodeJS"] = "node";
14
+ ClientMode["CloudflareWorkers"] = "cloudflare";
15
+ ClientMode["Bun"] = "bun";
16
+ ClientMode["Vercel"] = "vercel";
17
+ ClientMode["Web"] = "web";
18
+ })(ClientMode || (ClientMode = {}));
19
+ /**
20
+ * The main client used to interact with Discord
21
+ */
22
+ export class Client {
23
+ /**
24
+ * The options used to initialize the client
25
+ */
26
+ options;
27
+ /**
28
+ * The commands that the client has registered
29
+ */
30
+ commands;
31
+ /**
32
+ * The router used to handle requests
33
+ */
34
+ router;
35
+ /**
36
+ * The rest client used to interact with the Discord API
37
+ */
38
+ rest;
39
+ /**
40
+ * The handler for the component interactions sent from Discord
41
+ */
42
+ componentHandler;
43
+ commandHandler;
44
+ /**
45
+ * Creates a new client
46
+ * @param options The options used to initialize the client
47
+ * @param commands The commands that the client has registered
48
+ */
49
+ constructor(options, commands) {
50
+ if (!options.clientId)
51
+ throw new Error("Missing client ID");
52
+ if (!options.publicKey)
53
+ throw new Error("Missing public key");
54
+ if (!options.token)
55
+ throw new Error("Missing token");
56
+ this.options = options;
57
+ this.commands = commands;
58
+ const routerData = this.options.mode === ClientMode.Bun && this.options.port
59
+ ? { port: this.options.port }
60
+ : {};
61
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
62
+ this.router = AutoRouter(routerData);
63
+ this.rest = new RequestClient(options.token, options.requestOptions);
64
+ this.componentHandler = new ComponentHandler(this);
65
+ this.commandHandler = new CommandHandler(this);
66
+ this.setupRoutes();
67
+ if (this.options.autoDeploy)
68
+ this.deployCommands();
69
+ }
70
+ /**
71
+ * Deploy the commands registered to Discord.
72
+ * This is automatically called when running in NodeJS mode.
73
+ */
74
+ async deployCommands() {
75
+ try {
76
+ const commands = this.commands.map((command) => {
77
+ return command.serialize();
78
+ });
79
+ await this.rest.put(Routes.applicationCommands(this.options.clientId), {
80
+ body: commands
81
+ });
82
+ console.log(`Deployed ${commands.length} commands to Discord`);
83
+ }
84
+ catch (err) {
85
+ console.error("Failed to deploy commands");
86
+ console.error(err);
87
+ }
88
+ }
89
+ /**
90
+ * Setup the routes for the client
91
+ */
92
+ setupRoutes() {
93
+ this.router.get("/", () => {
94
+ if (this.options.redirectUrl)
95
+ return Response.redirect(this.options.redirectUrl, 302);
96
+ throw new StatusError(404);
97
+ });
98
+ this.router.post("/interaction", async (req, ctx) => {
99
+ const isValid = await this.validateInteraction(req);
100
+ if (!isValid) {
101
+ return new Response("Invalid request signature", { status: 401 });
102
+ }
103
+ const rawInteraction = (await req.json());
104
+ if (rawInteraction.type === InteractionType.Ping) {
105
+ return json({
106
+ type: InteractionResponseType.Pong
107
+ });
108
+ }
109
+ if (rawInteraction.type === InteractionType.ApplicationCommand) {
110
+ if (ctx?.waitUntil) {
111
+ ctx.waitUntil((async () => {
112
+ await this.commandHandler.handleCommandInteraction(rawInteraction);
113
+ })());
114
+ }
115
+ else {
116
+ await this.commandHandler.handleCommandInteraction(rawInteraction);
117
+ }
118
+ }
119
+ if (rawInteraction.type === InteractionType.ApplicationCommandAutocomplete) {
120
+ if (ctx?.waitUntil) {
121
+ ctx.waitUntil((async () => {
122
+ await this.commandHandler.handleAutocompleteInteraction(rawInteraction);
123
+ })());
124
+ }
125
+ else {
126
+ await this.commandHandler.handleAutocompleteInteraction(rawInteraction);
127
+ }
128
+ }
129
+ if (rawInteraction.type === InteractionType.ApplicationCommand) {
130
+ if (ctx?.waitUntil) {
131
+ ctx.waitUntil((async () => {
132
+ await this.commandHandler.handleCommandInteraction(rawInteraction);
133
+ })());
134
+ }
135
+ else {
136
+ await this.commandHandler.handleCommandInteraction(rawInteraction);
137
+ }
138
+ }
139
+ if (rawInteraction.type === InteractionType.MessageComponent) {
140
+ if (ctx?.waitUntil) {
141
+ ctx.waitUntil((async () => {
142
+ await this.componentHandler.handleInteraction(rawInteraction);
143
+ })());
144
+ }
145
+ else {
146
+ await this.componentHandler.handleInteraction(rawInteraction);
147
+ }
148
+ }
149
+ return new Response(null, { status: 202 });
150
+ });
151
+ }
152
+ /**
153
+ * Validate the interaction request
154
+ * @param req The request to validate
155
+ */
156
+ async validateInteraction(req) {
157
+ if (req.method !== "POST") {
158
+ throw new StatusError(405);
159
+ }
160
+ const isValid = await isValidRequest(req, this.options.publicKey, this.options.mode === ClientMode.CloudflareWorkers
161
+ ? PlatformAlgorithm.Cloudflare
162
+ : this.options.mode === ClientMode.Vercel
163
+ ? PlatformAlgorithm.VercelProd
164
+ : this.options.mode === ClientMode.Web
165
+ ? PlatformAlgorithm.Web
166
+ : PlatformAlgorithm.NewNode);
167
+ return isValid;
168
+ }
169
+ }
170
+ //# sourceMappingURL=Client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../src/classes/Client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA6B,MAAM,uBAAuB,CAAA;AAChF,OAAO,EAEN,uBAAuB,EACvB,eAAe,EACf,MAAM,EACN,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAuB,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;;GAGG;AACH,MAAM,CAAN,IAAY,UAMX;AAND,WAAY,UAAU;IACrB,6BAAe,CAAA;IACf,8CAAgC,CAAA;IAChC,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,yBAAW,CAAA;AACZ,CAAC,EANW,UAAU,KAAV,UAAU,QAMrB;AAmDD;;GAEG;AACH,MAAM,OAAO,MAAM;IAClB;;OAEG;IACH,OAAO,CAAe;IACtB;;OAEG;IACH,QAAQ,CAAe;IACvB;;OAEG;IACH,MAAM,CAA+C;IACrD;;OAEG;IACH,IAAI,CAAe;IACnB;;OAEG;IACH,gBAAgB,CAAkB;IAClC,cAAc,CAAgB;IAE9B;;;;OAIG;IACH,YAAY,OAAsB,EAAE,QAAuB;QAC1D,IAAI,CAAC,OAAO,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;QAC3D,IAAI,CAAC,OAAO,CAAC,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;QAC7D,IAAI,CAAC,OAAO,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;QACpD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,MAAM,UAAU,GACf,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI;YACxD,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAC7B,CAAC,CAAC,EAAE,CAAA;QACN,4DAA4D;QAC5D,IAAI,CAAC,MAAM,GAAG,UAAU,CAAkC,UAAU,CAAC,CAAA;QACrE,IAAI,CAAC,IAAI,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;QACpE,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAA;QAClD,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAA;QAC9C,IAAI,CAAC,WAAW,EAAE,CAAA;QAClB,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU;YAAE,IAAI,CAAC,cAAc,EAAE,CAAA;IACnD,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,cAAc;QACnB,IAAI,CAAC;YACJ,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC9C,OAAO,OAAO,CAAC,SAAS,EAAE,CAAA;YAC3B,CAAC,CAAC,CAAA;YACF,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBACtE,IAAI,EAAE,QAAQ;aACd,CAAC,CAAA;YACF,OAAO,CAAC,GAAG,CAAC,YAAY,QAAQ,CAAC,MAAM,sBAAsB,CAAC,CAAA;QAC/D,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAA;YAC1C,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACnB,CAAC;IACF,CAAC;IAED;;OAEG;IACK,WAAW;QAClB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE;YACzB,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW;gBAC3B,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAA;YACxD,MAAM,IAAI,WAAW,CAAC,GAAG,CAAC,CAAA;QAC3B,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,GAAG,EAAE,GAAsB,EAAE,EAAE;YACtE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;YACnD,IAAI,CAAC,OAAO,EAAE,CAAC;gBACd,OAAO,IAAI,QAAQ,CAAC,2BAA2B,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAA;YAClE,CAAC;YAED,MAAM,cAAc,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAA8B,CAAA;YACtE,IAAI,cAAc,CAAC,IAAI,KAAK,eAAe,CAAC,IAAI,EAAE,CAAC;gBAClD,OAAO,IAAI,CAAC;oBACX,IAAI,EAAE,uBAAuB,CAAC,IAAI;iBAClC,CAAC,CAAA;YACH,CAAC;YAED,IAAI,cAAc,CAAC,IAAI,KAAK,eAAe,CAAC,kBAAkB,EAAE,CAAC;gBAChE,IAAI,GAAG,EAAE,SAAS,EAAE,CAAC;oBACpB,GAAG,CAAC,SAAS,CACZ,CAAC,KAAK,IAAI,EAAE;wBACX,MAAM,IAAI,CAAC,cAAc,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAA;oBACnE,CAAC,CAAC,EAAE,CACJ,CAAA;gBACF,CAAC;qBAAM,CAAC;oBACP,MAAM,IAAI,CAAC,cAAc,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAA;gBACnE,CAAC;YACF,CAAC;YACD,IACC,cAAc,CAAC,IAAI,KAAK,eAAe,CAAC,8BAA8B,EACrE,CAAC;gBACF,IAAI,GAAG,EAAE,SAAS,EAAE,CAAC;oBACpB,GAAG,CAAC,SAAS,CACZ,CAAC,KAAK,IAAI,EAAE;wBACX,MAAM,IAAI,CAAC,cAAc,CAAC,6BAA6B,CACtD,cAAc,CACd,CAAA;oBACF,CAAC,CAAC,EAAE,CACJ,CAAA;gBACF,CAAC;qBAAM,CAAC;oBACP,MAAM,IAAI,CAAC,cAAc,CAAC,6BAA6B,CACtD,cAAc,CACd,CAAA;gBACF,CAAC;YACF,CAAC;YACD,IAAI,cAAc,CAAC,IAAI,KAAK,eAAe,CAAC,kBAAkB,EAAE,CAAC;gBAChE,IAAI,GAAG,EAAE,SAAS,EAAE,CAAC;oBACpB,GAAG,CAAC,SAAS,CACZ,CAAC,KAAK,IAAI,EAAE;wBACX,MAAM,IAAI,CAAC,cAAc,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAA;oBACnE,CAAC,CAAC,EAAE,CACJ,CAAA;gBACF,CAAC;qBAAM,CAAC;oBACP,MAAM,IAAI,CAAC,cAAc,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAA;gBACnE,CAAC;YACF,CAAC;YACD,IAAI,cAAc,CAAC,IAAI,KAAK,eAAe,CAAC,gBAAgB,EAAE,CAAC;gBAC9D,IAAI,GAAG,EAAE,SAAS,EAAE,CAAC;oBACpB,GAAG,CAAC,SAAS,CACZ,CAAC,KAAK,IAAI,EAAE;wBACX,MAAM,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAA;oBAC9D,CAAC,CAAC,EAAE,CACJ,CAAA;gBACF,CAAC;qBAAM,CAAC;oBACP,MAAM,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAA;gBAC9D,CAAC;YACF,CAAC;YACD,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAA;QAC3C,CAAC,CAAC,CAAA;IACH,CAAC;IAED;;;OAGG;IACK,KAAK,CAAC,mBAAmB,CAAC,GAAmB;QACpD,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC3B,MAAM,IAAI,WAAW,CAAC,GAAG,CAAC,CAAA;QAC3B,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,cAAc,CACnC,GAAG,EACH,IAAI,CAAC,OAAO,CAAC,SAAS,EACtB,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,iBAAiB;YACjD,CAAC,CAAC,iBAAiB,CAAC,UAAU;YAC9B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,MAAM;gBACxC,CAAC,CAAC,iBAAiB,CAAC,UAAU;gBAC9B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,GAAG;oBACrC,CAAC,CAAC,iBAAiB,CAAC,GAAG;oBACvB,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAC9B,CAAA;QACD,OAAO,OAAO,CAAA;IACf,CAAC;CACD"}
@@ -0,0 +1,35 @@
1
+ import { type APIApplicationCommandBasicOption, ApplicationCommandType } from "discord-api-types/v10";
2
+ import { BaseCommand } from "../abstracts/BaseCommand.js";
3
+ import type { CommandInteraction } from "../internals/CommandInteraction.js";
4
+ import type { AutocompleteInteraction } from "../internals/AutocompleteInteraction.js";
5
+ export type CommandOptions = APIApplicationCommandBasicOption[];
6
+ /**
7
+ * Represents a standard command that the user creates
8
+ */
9
+ export declare abstract class Command extends BaseCommand {
10
+ /**
11
+ * The options that the user passes along with the command in Discord
12
+ */
13
+ options?: CommandOptions;
14
+ /**
15
+ * The type of command, either ChatInput, User, or Message. User and Message are context menu commands.
16
+ * @default ChatInput
17
+ */
18
+ type: ApplicationCommandType;
19
+ /**
20
+ * The function that is called when the command is ran
21
+ * @param interaction The interaction that triggered the command
22
+ */
23
+ abstract run(interaction: CommandInteraction): Promise<void>;
24
+ /**
25
+ * The function that is called when the command's autocomplete is triggered.
26
+ * @param interaction The interaction that triggered the autocomplete
27
+ * @remarks You are expected to `override` this function to provide your own autocomplete functionality.
28
+ */
29
+ autocomplete(interaction: AutocompleteInteraction): Promise<void>;
30
+ /**
31
+ * @internal
32
+ */
33
+ serializeOptions(): CommandOptions | undefined;
34
+ }
35
+ //# sourceMappingURL=Command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["../../../src/classes/Command.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gCAAgC,EACrC,sBAAsB,EACtB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAA;AAEtF,MAAM,MAAM,cAAc,GAAG,gCAAgC,EAAE,CAAA;AAE/D;;GAEG;AACH,8BAAsB,OAAQ,SAAQ,WAAW;IAChD;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAA;IAExB;;;OAGG;IACH,IAAI,EAAE,sBAAsB,CAAmC;IAE/D;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAE5D;;;;OAIG;IACU,YAAY,CACxB,WAAW,EAAE,uBAAuB,GAClC,OAAO,CAAC,IAAI,CAAC;IAMhB;;OAEG;IACH,gBAAgB;CAGhB"}
@@ -0,0 +1,31 @@
1
+ import { ApplicationCommandType } from "discord-api-types/v10";
2
+ import { BaseCommand } from "../abstracts/BaseCommand.js";
3
+ /**
4
+ * Represents a standard command that the user creates
5
+ */
6
+ export class Command extends BaseCommand {
7
+ /**
8
+ * The options that the user passes along with the command in Discord
9
+ */
10
+ options;
11
+ /**
12
+ * The type of command, either ChatInput, User, or Message. User and Message are context menu commands.
13
+ * @default ChatInput
14
+ */
15
+ type = ApplicationCommandType.ChatInput;
16
+ /**
17
+ * The function that is called when the command's autocomplete is triggered.
18
+ * @param interaction The interaction that triggered the autocomplete
19
+ * @remarks You are expected to `override` this function to provide your own autocomplete functionality.
20
+ */
21
+ async autocomplete(interaction) {
22
+ throw new Error(`The ${interaction.rawData.data.name} command does not support autocomplete`);
23
+ }
24
+ /**
25
+ * @internal
26
+ */
27
+ serializeOptions() {
28
+ return this.options;
29
+ }
30
+ }
31
+ //# sourceMappingURL=Command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Command.js","sourceRoot":"","sources":["../../../src/classes/Command.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,sBAAsB,EACtB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAMzD;;GAEG;AACH,MAAM,OAAgB,OAAQ,SAAQ,WAAW;IAChD;;OAEG;IACH,OAAO,CAAiB;IAExB;;;OAGG;IACH,IAAI,GAA2B,sBAAsB,CAAC,SAAS,CAAA;IAQ/D;;;;OAIG;IACI,KAAK,CAAC,YAAY,CACxB,WAAoC;QAEpC,MAAM,IAAI,KAAK,CACd,OAAO,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,wCAAwC,CAC5E,CAAA;IACF,CAAC;IAED;;OAEG;IACH,gBAAgB;QACf,OAAO,IAAI,CAAC,OAAO,CAAA;IACpB,CAAC;CACD"}
@@ -0,0 +1,22 @@
1
+ import { type APIApplicationCommandSubcommandGroupOption, type APIApplicationCommandSubcommandOption } from "discord-api-types/v10";
2
+ import type { Command } from "./Command.js";
3
+ import { CommandWithSubcommands } from "./CommandWithSubcommands.js";
4
+ /**
5
+ * Represents a subcommand group command that the user creates.
6
+ * You make this instead of a {@link Command} class when you want to have subcommand groups in your options.
7
+ */
8
+ export declare abstract class CommandWithSubcommandGroups extends CommandWithSubcommands {
9
+ /**
10
+ * The subcommands that the user can use
11
+ */
12
+ subcommands: Command[];
13
+ /**
14
+ * The subcommands that the user can use
15
+ */
16
+ abstract subcommandGroups: CommandWithSubcommands[];
17
+ /**
18
+ * @internal
19
+ */
20
+ serializeOptions(): (APIApplicationCommandSubcommandGroupOption | APIApplicationCommandSubcommandOption)[];
21
+ }
22
+ //# sourceMappingURL=CommandWithSubcommandGroups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandWithSubcommandGroups.d.ts","sourceRoot":"","sources":["../../../src/classes/CommandWithSubcommandGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,0CAA0C,EAC/C,KAAK,qCAAqC,EAE1C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE;;;GAGG;AACH,8BAAsB,2BAA4B,SAAQ,sBAAsB;IAC/E;;OAEG;IACH,WAAW,EAAE,OAAO,EAAE,CAAK;IAE3B;;OAEG;IACH,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,CAAA;IAEnD;;OAEG;IACH,gBAAgB;CAmBhB"}
@@ -0,0 +1,31 @@
1
+ import { ApplicationCommandOptionType } from "discord-api-types/v10";
2
+ import { CommandWithSubcommands } from "./CommandWithSubcommands.js";
3
+ /**
4
+ * Represents a subcommand group command that the user creates.
5
+ * You make this instead of a {@link Command} class when you want to have subcommand groups in your options.
6
+ */
7
+ export class CommandWithSubcommandGroups extends CommandWithSubcommands {
8
+ /**
9
+ * The subcommands that the user can use
10
+ */
11
+ subcommands = [];
12
+ /**
13
+ * @internal
14
+ */
15
+ serializeOptions() {
16
+ const subcommands = this.subcommands.map((subcommand) => ({
17
+ name: subcommand.name,
18
+ description: subcommand.description,
19
+ type: ApplicationCommandOptionType.Subcommand,
20
+ options: subcommand.serializeOptions()
21
+ }));
22
+ const subcommandGroups = this.subcommandGroups.map((subcommandGroup) => ({
23
+ name: subcommandGroup.name,
24
+ description: subcommandGroup.description,
25
+ type: ApplicationCommandOptionType.SubcommandGroup,
26
+ options: subcommandGroup.serializeOptions()
27
+ }));
28
+ return [...subcommands, ...subcommandGroups];
29
+ }
30
+ }
31
+ //# sourceMappingURL=CommandWithSubcommandGroups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandWithSubcommandGroups.js","sourceRoot":"","sources":["../../../src/classes/CommandWithSubcommandGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,4BAA4B,EAC5B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE;;;GAGG;AACH,MAAM,OAAgB,2BAA4B,SAAQ,sBAAsB;IAC/E;;OAEG;IACH,WAAW,GAAc,EAAE,CAAA;IAO3B;;OAEG;IACH,gBAAgB;QACf,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YACzD,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,WAAW,EAAE,UAAU,CAAC,WAAW;YACnC,IAAI,EAAE,4BAA4B,CAAC,UAAU;YAC7C,OAAO,EACN,UAAU,CAAC,gBAAgB,EAAwC;SACpE,CAAC,CAA4C,CAAA;QAE9C,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;YACxE,IAAI,EAAE,eAAe,CAAC,IAAI;YAC1B,WAAW,EAAE,eAAe,CAAC,WAAW;YACxC,IAAI,EAAE,4BAA4B,CAAC,eAAe;YAClD,OAAO,EACN,eAAe,CAAC,gBAAgB,EAA6C;SAC9E,CAAC,CAAiD,CAAA;QAEnD,OAAO,CAAC,GAAG,WAAW,EAAE,GAAG,gBAAgB,CAAC,CAAA;IAC7C,CAAC;CACD"}
@@ -0,0 +1,19 @@
1
+ import { ApplicationCommandType, type RESTPostAPIApplicationCommandsJSONBody } from "discord-api-types/v10";
2
+ import { BaseCommand } from "../abstracts/BaseCommand.js";
3
+ import type { Command } from "./Command.js";
4
+ /**
5
+ * Represents a subcommand command that the user creates.
6
+ * You make this instead of a {@link Command} class when you want to have subcommands in your options.
7
+ */
8
+ export declare abstract class CommandWithSubcommands extends BaseCommand {
9
+ type: ApplicationCommandType;
10
+ /**
11
+ * The subcommands that the user can use
12
+ */
13
+ abstract subcommands: Command[];
14
+ /**
15
+ * @internal
16
+ */
17
+ serializeOptions(): RESTPostAPIApplicationCommandsJSONBody["options"];
18
+ }
19
+ //# sourceMappingURL=CommandWithSubcommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandWithSubcommands.d.ts","sourceRoot":"","sources":["../../../src/classes/CommandWithSubcommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,sBAAsB,EACtB,KAAK,sCAAsC,EAC3C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C;;;GAGG;AACH,8BAAsB,sBAAuB,SAAQ,WAAW;IAC/D,IAAI,yBAAmC;IAEvC;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,EAAE,CAAA;IAE/B;;OAEG;IACH,gBAAgB,IAAI,sCAAsC,CAAC,SAAS,CAAC;CASrE"}
@@ -0,0 +1,21 @@
1
+ import { ApplicationCommandOptionType, ApplicationCommandType } from "discord-api-types/v10";
2
+ import { BaseCommand } from "../abstracts/BaseCommand.js";
3
+ /**
4
+ * Represents a subcommand command that the user creates.
5
+ * You make this instead of a {@link Command} class when you want to have subcommands in your options.
6
+ */
7
+ export class CommandWithSubcommands extends BaseCommand {
8
+ type = ApplicationCommandType.ChatInput;
9
+ /**
10
+ * @internal
11
+ */
12
+ serializeOptions() {
13
+ return this.subcommands.map((subcommand) => ({
14
+ name: subcommand.name,
15
+ description: subcommand.description,
16
+ type: ApplicationCommandOptionType.Subcommand,
17
+ options: subcommand.serializeOptions()
18
+ }));
19
+ }
20
+ }
21
+ //# sourceMappingURL=CommandWithSubcommands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandWithSubcommands.js","sourceRoot":"","sources":["../../../src/classes/CommandWithSubcommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,4BAA4B,EAC5B,sBAAsB,EAEtB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAGzD;;;GAGG;AACH,MAAM,OAAgB,sBAAuB,SAAQ,WAAW;IAC/D,IAAI,GAAG,sBAAsB,CAAC,SAAS,CAAA;IAOvC;;OAEG;IACH,gBAAgB;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC5C,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,WAAW,EAAE,UAAU,CAAC,WAAW;YACnC,IAAI,EAAE,4BAA4B,CAAC,UAAU;YAC7C,OAAO,EACN,UAAU,CAAC,gBAAgB,EAAwC;SACpE,CAAC,CAA4C,CAAA;IAC/C,CAAC;CACD"}
@@ -0,0 +1,13 @@
1
+ import { type APIMentionableSelectComponent, ComponentType } from "discord-api-types/v10";
2
+ import { AnySelectMenu } from "../abstracts/AnySelectMenu.js";
3
+ import type { MentionableSelectMenuInteraction } from "../internals/MentionableSelectMenuInteraction.js";
4
+ export declare abstract class MentionableSelectMenu extends AnySelectMenu {
5
+ type: ComponentType.MentionableSelect;
6
+ defaultValues?: APIMentionableSelectComponent["default_values"];
7
+ abstract run(interaction: MentionableSelectMenuInteraction): Promise<void>;
8
+ serializeOptions(): {
9
+ type: ComponentType.MentionableSelect;
10
+ default_values: import("discord-api-types/v10").APISelectMenuDefaultValue<import("discord-api-types/v10").SelectMenuDefaultValueType.Role | import("discord-api-types/v10").SelectMenuDefaultValueType.User>[] | undefined;
11
+ };
12
+ }
13
+ //# sourceMappingURL=MentionableSelectMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentionableSelectMenu.d.ts","sourceRoot":"","sources":["../../../src/classes/MentionableSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,6BAA6B,EAClC,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAA;AAExG,8BAAsB,qBAAsB,SAAQ,aAAa;IAChE,IAAI,EAAE,aAAa,CAAC,iBAAiB,CAAkC;IACvE,aAAa,CAAC,EAAE,6BAA6B,CAAC,gBAAgB,CAAC,CAAA;IAC/D,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1E,gBAAgB;;;;CAMhB"}
@@ -0,0 +1,13 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { AnySelectMenu } from "../abstracts/AnySelectMenu.js";
3
+ export class MentionableSelectMenu extends AnySelectMenu {
4
+ type = ComponentType.MentionableSelect;
5
+ defaultValues;
6
+ serializeOptions() {
7
+ return {
8
+ type: this.type,
9
+ default_values: this.defaultValues
10
+ };
11
+ }
12
+ }
13
+ //# sourceMappingURL=MentionableSelectMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentionableSelectMenu.js","sourceRoot":"","sources":["../../../src/classes/MentionableSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAG7D,MAAM,OAAgB,qBAAsB,SAAQ,aAAa;IAChE,IAAI,GAAoC,aAAa,CAAC,iBAAiB,CAAA;IACvE,aAAa,CAAkD;IAG/D,gBAAgB;QACf,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,aAAa;SAClC,CAAA;IACF,CAAC;CACD"}
@@ -0,0 +1,3 @@
1
+ export declare class Paginator {
2
+ }
3
+ //# sourceMappingURL=Paginator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Paginator.d.ts","sourceRoot":"","sources":["../../../src/classes/Paginator.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;CAGrB"}
@@ -0,0 +1,3 @@
1
+ export class Paginator {
2
+ }
3
+ //# sourceMappingURL=Paginator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Paginator.js","sourceRoot":"","sources":["../../../src/classes/Paginator.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAS;CAGrB"}
@@ -0,0 +1,13 @@
1
+ import { type APIRoleSelectComponent, ComponentType } from "discord-api-types/v10";
2
+ import { AnySelectMenu } from "../abstracts/AnySelectMenu.js";
3
+ import type { RoleSelectMenuInteraction } from "../internals/RoleSelectMenuInteraction.js";
4
+ export declare abstract class RoleSelectMenu extends AnySelectMenu {
5
+ type: ComponentType.RoleSelect;
6
+ defaultValues?: APIRoleSelectComponent["default_values"];
7
+ abstract run(interaction: RoleSelectMenuInteraction): Promise<void>;
8
+ serializeOptions(): {
9
+ type: ComponentType.RoleSelect;
10
+ default_values: import("discord-api-types/v10").APISelectMenuDefaultValue<import("discord-api-types/v10").SelectMenuDefaultValueType.Role>[] | undefined;
11
+ };
12
+ }
13
+ //# sourceMappingURL=RoleSelectMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleSelectMenu.d.ts","sourceRoot":"","sources":["../../../src/classes/RoleSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,sBAAsB,EAC3B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAA;AAE1F,8BAAsB,cAAe,SAAQ,aAAa;IACzD,IAAI,EAAE,aAAa,CAAC,UAAU,CAA2B;IACzD,aAAa,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAA;IACxD,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnE,gBAAgB;;;;CAMhB"}
@@ -0,0 +1,13 @@
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
+ defaultValues;
6
+ serializeOptions() {
7
+ return {
8
+ type: this.type,
9
+ default_values: this.defaultValues
10
+ };
11
+ }
12
+ }
13
+ //# sourceMappingURL=RoleSelectMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleSelectMenu.js","sourceRoot":"","sources":["../../../src/classes/RoleSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAG7D,MAAM,OAAgB,cAAe,SAAQ,aAAa;IACzD,IAAI,GAA6B,aAAa,CAAC,UAAU,CAAA;IACzD,aAAa,CAA2C;IAGxD,gBAAgB;QACf,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,aAAa;SAClC,CAAA;IACF,CAAC;CACD"}
@@ -0,0 +1,27 @@
1
+ import type { BaseComponent } from "../abstracts/BaseComponent.js";
2
+ export declare class Row {
3
+ /**
4
+ * The components in the action row
5
+ */
6
+ components: BaseComponent[];
7
+ constructor(components: BaseComponent[]);
8
+ /**
9
+ * Add a component to the action row
10
+ * @param component The component to add
11
+ */
12
+ addComponent(component: BaseComponent): void;
13
+ /**
14
+ * Remove a component from the action row
15
+ * @param component The component to remove
16
+ */
17
+ removeComponent(component: BaseComponent): void;
18
+ /**
19
+ * Remove all components from the action row
20
+ */
21
+ removeAllComponents(): void;
22
+ serialize(): {
23
+ type: number;
24
+ components: import("discord-api-types/v10").APIBaseComponent<import("discord-api-types/v10").ComponentType>[];
25
+ };
26
+ }
27
+ //# sourceMappingURL=Row.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../src/classes/Row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAElE,qBAAa,GAAG;IACf;;OAEG;IACH,UAAU,EAAE,aAAa,EAAE,CAAA;gBAEf,UAAU,EAAE,aAAa,EAAE;IAIvC;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,aAAa;IAIrC;;;OAGG;IACH,eAAe,CAAC,SAAS,EAAE,aAAa;IAMxC;;OAEG;IACH,mBAAmB;IAInB,SAAS;;;;CAMT"}