@buape/carbon 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/dist/package.json +8 -7
  2. package/dist/src/abstracts/AnySelectMenu.d.ts +4 -3
  3. package/dist/src/abstracts/AnySelectMenu.d.ts.map +1 -1
  4. package/dist/src/abstracts/AnySelectMenu.js +8 -2
  5. package/dist/src/abstracts/AnySelectMenu.js.map +1 -1
  6. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts +0 -1
  7. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts.map +1 -1
  8. package/dist/src/abstracts/AnySelectMenuInteraction.js +0 -2
  9. package/dist/src/abstracts/AnySelectMenuInteraction.js.map +1 -1
  10. package/dist/src/abstracts/BaseChannel.d.ts +12 -3
  11. package/dist/src/abstracts/BaseChannel.d.ts.map +1 -1
  12. package/dist/src/abstracts/BaseChannel.js +15 -1
  13. package/dist/src/abstracts/BaseChannel.js.map +1 -1
  14. package/dist/src/abstracts/BaseCommand.d.ts +18 -8
  15. package/dist/src/abstracts/BaseCommand.d.ts.map +1 -1
  16. package/dist/src/abstracts/BaseCommand.js +24 -7
  17. package/dist/src/abstracts/BaseCommand.js.map +1 -1
  18. package/dist/src/abstracts/BaseComponent.d.ts +10 -24
  19. package/dist/src/abstracts/BaseComponent.d.ts.map +1 -1
  20. package/dist/src/abstracts/BaseComponent.js +5 -25
  21. package/dist/src/abstracts/BaseComponent.js.map +1 -1
  22. package/dist/src/abstracts/BaseComponentInteraction.d.ts +3 -4
  23. package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -1
  24. package/dist/src/abstracts/BaseComponentInteraction.js +3 -6
  25. package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -1
  26. package/dist/src/abstracts/BaseGuildChannel.d.ts +4 -3
  27. package/dist/src/abstracts/BaseGuildChannel.d.ts.map +1 -1
  28. package/dist/src/abstracts/BaseGuildChannel.js +5 -3
  29. package/dist/src/abstracts/BaseGuildChannel.js.map +1 -1
  30. package/dist/src/abstracts/BaseGuildTextChannel.d.ts +1 -1
  31. package/dist/src/abstracts/BaseGuildTextChannel.d.ts.map +1 -1
  32. package/dist/src/abstracts/BaseInteraction.d.ts +49 -36
  33. package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -1
  34. package/dist/src/abstracts/BaseInteraction.js +105 -34
  35. package/dist/src/abstracts/BaseInteraction.js.map +1 -1
  36. package/dist/src/abstracts/BaseListener.d.ts +13 -0
  37. package/dist/src/abstracts/BaseListener.d.ts.map +1 -0
  38. package/dist/src/abstracts/BaseListener.js +8 -0
  39. package/dist/src/abstracts/BaseListener.js.map +1 -0
  40. package/dist/src/abstracts/BaseMessageInteractiveComponent.d.ts +39 -0
  41. package/dist/src/abstracts/BaseMessageInteractiveComponent.d.ts.map +1 -0
  42. package/dist/src/abstracts/BaseMessageInteractiveComponent.js +33 -0
  43. package/dist/src/abstracts/BaseMessageInteractiveComponent.js.map +1 -0
  44. package/dist/src/abstracts/BaseModalComponent.d.ts +29 -0
  45. package/dist/src/abstracts/BaseModalComponent.d.ts.map +1 -0
  46. package/dist/src/abstracts/BaseModalComponent.js +33 -0
  47. package/dist/src/abstracts/BaseModalComponent.js.map +1 -0
  48. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts +5 -4
  49. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts.map +1 -1
  50. package/dist/src/abstracts/GuildThreadOnlyChannel.js +1 -1
  51. package/dist/src/abstracts/GuildThreadOnlyChannel.js.map +1 -1
  52. package/dist/src/abstracts/Plugin.d.ts +6 -2
  53. package/dist/src/abstracts/Plugin.d.ts.map +1 -1
  54. package/dist/src/abstracts/Plugin.js.map +1 -1
  55. package/dist/src/classes/Client.d.ts +42 -12
  56. package/dist/src/classes/Client.d.ts.map +1 -1
  57. package/dist/src/classes/Client.js +98 -25
  58. package/dist/src/classes/Client.js.map +1 -1
  59. package/dist/src/classes/Command.d.ts +10 -2
  60. package/dist/src/classes/Command.d.ts.map +1 -1
  61. package/dist/src/classes/Command.js +12 -1
  62. package/dist/src/classes/Command.js.map +1 -1
  63. package/dist/src/classes/Listener.d.ts +376 -5
  64. package/dist/src/classes/Listener.d.ts.map +1 -1
  65. package/dist/src/classes/Listener.js +1011 -1
  66. package/dist/src/classes/Listener.js.map +1 -1
  67. package/dist/src/classes/Modal.d.ts +22 -5
  68. package/dist/src/classes/Modal.d.ts.map +1 -1
  69. package/dist/src/classes/Modal.js +14 -0
  70. package/dist/src/classes/Modal.js.map +1 -1
  71. package/dist/src/classes/RequestClient.d.ts +79 -0
  72. package/dist/src/classes/RequestClient.d.ts.map +1 -0
  73. package/dist/src/classes/RequestClient.js +225 -0
  74. package/dist/src/classes/RequestClient.js.map +1 -0
  75. package/dist/src/classes/{Button.d.ts → components/Button.d.ts} +8 -5
  76. package/dist/src/classes/components/Button.d.ts.map +1 -0
  77. package/dist/src/classes/{Button.js → components/Button.js} +13 -3
  78. package/dist/src/classes/components/Button.js.map +1 -0
  79. package/dist/src/classes/{ChannelSelectMenu.d.ts → components/ChannelSelectMenu.d.ts} +6 -4
  80. package/dist/src/classes/components/ChannelSelectMenu.d.ts.map +1 -0
  81. package/dist/src/classes/{ChannelSelectMenu.js → components/ChannelSelectMenu.js} +8 -1
  82. package/dist/src/classes/components/ChannelSelectMenu.js.map +1 -0
  83. package/dist/src/classes/components/Container.d.ts +23 -0
  84. package/dist/src/classes/components/Container.d.ts.map +1 -0
  85. package/dist/src/classes/components/Container.js +27 -0
  86. package/dist/src/classes/components/Container.js.map +1 -0
  87. package/dist/src/classes/components/File.d.ts +21 -0
  88. package/dist/src/classes/components/File.d.ts.map +1 -0
  89. package/dist/src/classes/components/File.js +33 -0
  90. package/dist/src/classes/components/File.js.map +1 -0
  91. package/dist/src/classes/components/MediaGallery.d.ts +27 -0
  92. package/dist/src/classes/components/MediaGallery.d.ts.map +1 -0
  93. package/dist/src/classes/components/MediaGallery.js +27 -0
  94. package/dist/src/classes/components/MediaGallery.js.map +1 -0
  95. package/dist/src/classes/{MentionableSelectMenu.d.ts → components/MentionableSelectMenu.d.ts} +6 -4
  96. package/dist/src/classes/components/MentionableSelectMenu.d.ts.map +1 -0
  97. package/dist/src/classes/{MentionableSelectMenu.js → components/MentionableSelectMenu.js} +8 -1
  98. package/dist/src/classes/components/MentionableSelectMenu.js.map +1 -0
  99. package/dist/src/classes/{RoleSelectMenu.d.ts → components/RoleSelectMenu.d.ts} +6 -4
  100. package/dist/src/classes/components/RoleSelectMenu.d.ts.map +1 -0
  101. package/dist/src/classes/components/RoleSelectMenu.js +20 -0
  102. package/dist/src/classes/components/RoleSelectMenu.js.map +1 -0
  103. package/dist/src/classes/components/Row.d.ts +29 -0
  104. package/dist/src/classes/components/Row.d.ts.map +1 -0
  105. package/dist/src/classes/{Row.js → components/Row.js} +8 -2
  106. package/dist/src/classes/components/Row.js.map +1 -0
  107. package/dist/src/classes/components/Section.d.ts +22 -0
  108. package/dist/src/classes/components/Section.d.ts.map +1 -0
  109. package/dist/src/classes/components/Section.js +15 -0
  110. package/dist/src/classes/components/Section.js.map +1 -0
  111. package/dist/src/classes/components/Separator.d.ts +22 -0
  112. package/dist/src/classes/components/Separator.d.ts.map +1 -0
  113. package/dist/src/classes/components/Separator.js +33 -0
  114. package/dist/src/classes/components/Separator.js.map +1 -0
  115. package/dist/src/classes/components/StringSelectMenu.d.ts +15 -0
  116. package/dist/src/classes/components/StringSelectMenu.d.ts.map +1 -0
  117. package/dist/src/classes/components/StringSelectMenu.js +19 -0
  118. package/dist/src/classes/components/StringSelectMenu.js.map +1 -0
  119. package/dist/src/classes/components/TextDisplay.d.ts +10 -0
  120. package/dist/src/classes/components/TextDisplay.d.ts.map +1 -0
  121. package/dist/src/classes/components/TextDisplay.js +19 -0
  122. package/dist/src/classes/components/TextDisplay.js.map +1 -0
  123. package/dist/src/classes/{TextInput.d.ts → components/TextInput.d.ts} +4 -3
  124. package/dist/src/classes/components/TextInput.d.ts.map +1 -0
  125. package/dist/src/classes/{TextInput.js → components/TextInput.js} +3 -2
  126. package/dist/src/classes/components/TextInput.js.map +1 -0
  127. package/dist/src/classes/components/Thumbnail.d.ts +13 -0
  128. package/dist/src/classes/components/Thumbnail.d.ts.map +1 -0
  129. package/dist/src/classes/components/Thumbnail.js +16 -0
  130. package/dist/src/classes/components/Thumbnail.js.map +1 -0
  131. package/dist/src/classes/{UserSelectMenu.d.ts → components/UserSelectMenu.d.ts} +6 -4
  132. package/dist/src/classes/components/UserSelectMenu.d.ts.map +1 -0
  133. package/dist/src/classes/components/UserSelectMenu.js +20 -0
  134. package/dist/src/classes/components/UserSelectMenu.js.map +1 -0
  135. package/dist/src/errors/BaseError.d.ts +3 -0
  136. package/dist/src/errors/BaseError.d.ts.map +1 -0
  137. package/dist/src/errors/BaseError.js +3 -0
  138. package/dist/src/errors/BaseError.js.map +1 -0
  139. package/dist/src/errors/DiscordError.d.ts +25 -0
  140. package/dist/src/errors/DiscordError.d.ts.map +1 -0
  141. package/dist/src/errors/DiscordError.js +31 -0
  142. package/dist/src/errors/DiscordError.js.map +1 -0
  143. package/dist/src/errors/RatelimitError.d.ts +15 -0
  144. package/dist/src/errors/RatelimitError.d.ts.map +1 -0
  145. package/dist/src/errors/RatelimitError.js +18 -0
  146. package/dist/src/errors/RatelimitError.js.map +1 -0
  147. package/dist/src/{factories → functions}/channelFactory.d.ts +3 -2
  148. package/dist/src/functions/channelFactory.d.ts.map +1 -0
  149. package/dist/src/functions/channelFactory.js.map +1 -0
  150. package/dist/src/functions/enforceChoicesLimit.d.ts +3 -0
  151. package/dist/src/functions/enforceChoicesLimit.d.ts.map +1 -0
  152. package/dist/src/functions/enforceChoicesLimit.js +17 -0
  153. package/dist/src/functions/enforceChoicesLimit.js.map +1 -0
  154. package/dist/src/functions/errorsMapper.d.ts +14 -0
  155. package/dist/src/functions/errorsMapper.d.ts.map +1 -0
  156. package/dist/src/functions/errorsMapper.js +46 -0
  157. package/dist/src/functions/errorsMapper.js.map +1 -0
  158. package/dist/src/index.d.ts +29 -63
  159. package/dist/src/index.d.ts.map +1 -1
  160. package/dist/src/index.js +31 -15
  161. package/dist/src/index.js.map +1 -1
  162. package/dist/src/internals/AutocompleteInteraction.d.ts +15 -5
  163. package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -1
  164. package/dist/src/internals/AutocompleteInteraction.js +27 -15
  165. package/dist/src/internals/AutocompleteInteraction.js.map +1 -1
  166. package/dist/src/internals/ButtonInteraction.d.ts +0 -1
  167. package/dist/src/internals/ButtonInteraction.d.ts.map +1 -1
  168. package/dist/src/internals/ButtonInteraction.js +0 -2
  169. package/dist/src/internals/ButtonInteraction.js.map +1 -1
  170. package/dist/src/internals/CommandHandler.d.ts +1 -1
  171. package/dist/src/internals/CommandHandler.d.ts.map +1 -1
  172. package/dist/src/internals/CommandHandler.js +25 -3
  173. package/dist/src/internals/CommandHandler.js.map +1 -1
  174. package/dist/src/internals/CommandInteraction.d.ts +7 -1
  175. package/dist/src/internals/CommandInteraction.d.ts.map +1 -1
  176. package/dist/src/internals/CommandInteraction.js +10 -4
  177. package/dist/src/internals/CommandInteraction.js.map +1 -1
  178. package/dist/src/internals/ComponentHandler.d.ts +8 -5
  179. package/dist/src/internals/ComponentHandler.d.ts.map +1 -1
  180. package/dist/src/internals/ComponentHandler.js +40 -16
  181. package/dist/src/internals/ComponentHandler.js.map +1 -1
  182. package/dist/src/internals/EventHandler.d.ts +7 -5
  183. package/dist/src/internals/EventHandler.d.ts.map +1 -1
  184. package/dist/src/internals/EventHandler.js +13 -11
  185. package/dist/src/internals/EventHandler.js.map +1 -1
  186. package/dist/src/internals/ModalHandler.d.ts +1 -1
  187. package/dist/src/internals/ModalHandler.d.ts.map +1 -1
  188. package/dist/src/internals/ModalHandler.js +6 -2
  189. package/dist/src/internals/ModalHandler.js.map +1 -1
  190. package/dist/src/internals/ModalInteraction.d.ts +2 -3
  191. package/dist/src/internals/ModalInteraction.d.ts.map +1 -1
  192. package/dist/src/internals/ModalInteraction.js +3 -4
  193. package/dist/src/internals/ModalInteraction.js.map +1 -1
  194. package/dist/src/internals/OptionsHandler.d.ts +13 -3
  195. package/dist/src/internals/OptionsHandler.d.ts.map +1 -1
  196. package/dist/src/internals/OptionsHandler.js +51 -1
  197. package/dist/src/internals/OptionsHandler.js.map +1 -1
  198. package/dist/src/permissions.d.ts +54 -0
  199. package/dist/src/permissions.d.ts.map +1 -0
  200. package/dist/src/permissions.js +4 -0
  201. package/dist/src/permissions.js.map +1 -0
  202. package/dist/src/plugins/command-data/CommandDataPlugin.d.ts +16 -0
  203. package/dist/src/plugins/command-data/CommandDataPlugin.d.ts.map +1 -0
  204. package/dist/src/plugins/command-data/CommandDataPlugin.js +46 -0
  205. package/dist/src/plugins/command-data/CommandDataPlugin.js.map +1 -0
  206. package/dist/src/plugins/command-data/index.d.ts +2 -0
  207. package/dist/src/plugins/command-data/index.d.ts.map +1 -0
  208. package/dist/src/plugins/command-data/index.js +2 -0
  209. package/dist/src/plugins/command-data/index.js.map +1 -0
  210. package/dist/src/plugins/gateway/GatewayPlugin.d.ts +41 -0
  211. package/dist/src/plugins/gateway/GatewayPlugin.d.ts.map +1 -0
  212. package/dist/src/plugins/gateway/GatewayPlugin.js +282 -0
  213. package/dist/src/plugins/gateway/GatewayPlugin.js.map +1 -0
  214. package/dist/src/plugins/gateway/index.d.ts +6 -0
  215. package/dist/src/plugins/gateway/index.d.ts.map +1 -0
  216. package/dist/src/plugins/gateway/index.js +6 -0
  217. package/dist/src/plugins/gateway/index.js.map +1 -0
  218. package/dist/src/plugins/gateway/types.d.ts +62 -0
  219. package/dist/src/plugins/gateway/types.d.ts.map +1 -0
  220. package/dist/src/plugins/gateway/types.js +5 -0
  221. package/dist/src/plugins/gateway/types.js.map +1 -0
  222. package/dist/src/plugins/gateway/utils/heartbeat.d.ts +17 -0
  223. package/dist/src/plugins/gateway/utils/heartbeat.d.ts.map +1 -0
  224. package/dist/src/plugins/gateway/utils/heartbeat.js +28 -0
  225. package/dist/src/plugins/gateway/utils/heartbeat.js.map +1 -0
  226. package/dist/src/plugins/gateway/utils/monitor.d.ts +37 -0
  227. package/dist/src/plugins/gateway/utils/monitor.d.ts.map +1 -0
  228. package/dist/src/plugins/gateway/utils/monitor.js +88 -0
  229. package/dist/src/plugins/gateway/utils/monitor.js.map +1 -0
  230. package/dist/src/plugins/gateway/utils/payload.d.ts +22 -0
  231. package/dist/src/plugins/gateway/utils/payload.d.ts.map +1 -0
  232. package/dist/src/plugins/gateway/utils/payload.js +47 -0
  233. package/dist/src/plugins/gateway/utils/payload.js.map +1 -0
  234. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.d.ts +26 -0
  235. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.d.ts.map +1 -0
  236. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.js +74 -0
  237. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.js.map +1 -0
  238. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.d.ts +9 -0
  239. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.d.ts.map +1 -0
  240. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.js +10 -0
  241. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.js.map +1 -0
  242. package/dist/src/plugins/gateway-forwarder/index.d.ts +4 -0
  243. package/dist/src/plugins/gateway-forwarder/index.d.ts.map +1 -0
  244. package/dist/src/plugins/gateway-forwarder/index.js +4 -0
  245. package/dist/src/plugins/gateway-forwarder/index.js.map +1 -0
  246. package/dist/src/plugins/linked-roles/LinkedRoles.d.ts +1 -0
  247. package/dist/src/plugins/linked-roles/LinkedRoles.d.ts.map +1 -1
  248. package/dist/src/plugins/linked-roles/LinkedRoles.js +1 -0
  249. package/dist/src/plugins/linked-roles/LinkedRoles.js.map +1 -1
  250. package/dist/src/plugins/paginator/Paginator.d.ts +51 -0
  251. package/dist/src/plugins/paginator/Paginator.d.ts.map +1 -0
  252. package/dist/src/plugins/paginator/Paginator.js +155 -0
  253. package/dist/src/plugins/paginator/Paginator.js.map +1 -0
  254. package/dist/src/plugins/paginator/index.d.ts +8 -0
  255. package/dist/src/plugins/paginator/index.d.ts.map +1 -0
  256. package/dist/src/plugins/paginator/index.js +8 -0
  257. package/dist/src/plugins/paginator/index.js.map +1 -0
  258. package/dist/src/plugins/sharding/ShardingPlugin.d.ts +43 -0
  259. package/dist/src/plugins/sharding/ShardingPlugin.d.ts.map +1 -0
  260. package/dist/src/plugins/sharding/ShardingPlugin.js +111 -0
  261. package/dist/src/plugins/sharding/ShardingPlugin.js.map +1 -0
  262. package/dist/src/plugins/sharding/index.d.ts +3 -0
  263. package/dist/src/plugins/sharding/index.d.ts.map +1 -0
  264. package/dist/src/plugins/sharding/index.js +3 -0
  265. package/dist/src/plugins/sharding/index.js.map +1 -0
  266. package/dist/src/structures/DmChannel.d.ts +3 -3
  267. package/dist/src/structures/DmChannel.d.ts.map +1 -1
  268. package/dist/src/structures/DmChannel.js +5 -3
  269. package/dist/src/structures/DmChannel.js.map +1 -1
  270. package/dist/src/structures/GroupDmChannel.d.ts +1 -1
  271. package/dist/src/structures/GroupDmChannel.d.ts.map +1 -1
  272. package/dist/src/structures/Guild.d.ts +186 -6
  273. package/dist/src/structures/Guild.d.ts.map +1 -1
  274. package/dist/src/structures/Guild.js +409 -13
  275. package/dist/src/structures/Guild.js.map +1 -1
  276. package/dist/src/structures/GuildCategoryChannel.d.ts +1 -1
  277. package/dist/src/structures/GuildCategoryChannel.d.ts.map +1 -1
  278. package/dist/src/structures/GuildForumChannel.d.ts +1 -1
  279. package/dist/src/structures/GuildForumChannel.d.ts.map +1 -1
  280. package/dist/src/structures/GuildMember.d.ts +15 -12
  281. package/dist/src/structures/GuildMember.d.ts.map +1 -1
  282. package/dist/src/structures/GuildMember.js +78 -19
  283. package/dist/src/structures/GuildMember.js.map +1 -1
  284. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts +1 -1
  285. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts.map +1 -1
  286. package/dist/src/structures/GuildTextChannel.d.ts +1 -1
  287. package/dist/src/structures/GuildTextChannel.d.ts.map +1 -1
  288. package/dist/src/structures/GuildThreadChannel.d.ts +1 -1
  289. package/dist/src/structures/GuildThreadChannel.d.ts.map +1 -1
  290. package/dist/src/structures/Message.d.ts +31 -14
  291. package/dist/src/structures/Message.d.ts.map +1 -1
  292. package/dist/src/structures/Message.js +126 -17
  293. package/dist/src/structures/Message.js.map +1 -1
  294. package/dist/src/structures/Poll.d.ts +25 -0
  295. package/dist/src/structures/Poll.d.ts.map +1 -0
  296. package/dist/src/structures/Poll.js +45 -0
  297. package/dist/src/structures/Poll.js.map +1 -0
  298. package/dist/src/structures/Role.d.ts +31 -13
  299. package/dist/src/structures/Role.d.ts.map +1 -1
  300. package/dist/src/structures/Role.js +50 -21
  301. package/dist/src/structures/Role.js.map +1 -1
  302. package/dist/src/structures/ThreadMember.d.ts +36 -0
  303. package/dist/src/structures/ThreadMember.d.ts.map +1 -0
  304. package/dist/src/structures/ThreadMember.js +72 -0
  305. package/dist/src/structures/ThreadMember.js.map +1 -0
  306. package/dist/src/structures/User.d.ts +10 -4
  307. package/dist/src/structures/User.d.ts.map +1 -1
  308. package/dist/src/structures/User.js +10 -1
  309. package/dist/src/structures/User.js.map +1 -1
  310. package/dist/src/structures/Webhook.d.ts +135 -0
  311. package/dist/src/structures/Webhook.d.ts.map +1 -0
  312. package/dist/src/structures/Webhook.js +239 -0
  313. package/dist/src/structures/Webhook.js.map +1 -0
  314. package/dist/src/types/index.d.ts +132 -0
  315. package/dist/src/types/index.d.ts.map +1 -0
  316. package/dist/src/types/index.js +2 -0
  317. package/dist/src/types/index.js.map +1 -0
  318. package/dist/src/types/listeners.d.ts +566 -0
  319. package/dist/src/types/listeners.d.ts.map +1 -0
  320. package/dist/src/types/listeners.js +12 -0
  321. package/dist/src/types/listeners.js.map +1 -0
  322. package/dist/src/utils/customIdParser.d.ts +3 -0
  323. package/dist/src/utils/customIdParser.d.ts.map +1 -0
  324. package/dist/src/utils/customIdParser.js +17 -0
  325. package/dist/src/utils/customIdParser.js.map +1 -0
  326. package/dist/src/utils/index.d.ts +4 -0
  327. package/dist/src/utils/index.d.ts.map +1 -0
  328. package/dist/src/utils/index.js +4 -0
  329. package/dist/src/utils/index.js.map +1 -0
  330. package/dist/src/utils/payload.d.ts +4 -0
  331. package/dist/src/utils/payload.d.ts.map +1 -0
  332. package/dist/src/utils/payload.js +45 -0
  333. package/dist/src/utils/payload.js.map +1 -0
  334. package/dist/src/utils/verification.d.ts +4 -0
  335. package/dist/src/utils/verification.d.ts.map +1 -0
  336. package/dist/src/{utils.js → utils/verification.js} +1 -26
  337. package/dist/src/utils/verification.js.map +1 -0
  338. package/dist/tsconfig.tsbuildinfo +1 -1
  339. package/package.json +8 -7
  340. package/dist/src/adapters/cloudflare/index.d.ts +0 -16
  341. package/dist/src/adapters/cloudflare/index.d.ts.map +0 -1
  342. package/dist/src/adapters/cloudflare/index.js +0 -17
  343. package/dist/src/adapters/cloudflare/index.js.map +0 -1
  344. package/dist/src/adapters/next/index.d.ts +0 -14
  345. package/dist/src/adapters/next/index.d.ts.map +0 -1
  346. package/dist/src/adapters/next/index.js +0 -17
  347. package/dist/src/adapters/next/index.js.map +0 -1
  348. package/dist/src/adapters/shared.d.ts +0 -10
  349. package/dist/src/adapters/shared.d.ts.map +0 -1
  350. package/dist/src/adapters/shared.js +0 -2
  351. package/dist/src/adapters/shared.js.map +0 -1
  352. package/dist/src/classes/Button.d.ts.map +0 -1
  353. package/dist/src/classes/Button.js.map +0 -1
  354. package/dist/src/classes/ChannelSelectMenu.d.ts.map +0 -1
  355. package/dist/src/classes/ChannelSelectMenu.js.map +0 -1
  356. package/dist/src/classes/MentionableSelectMenu.d.ts.map +0 -1
  357. package/dist/src/classes/MentionableSelectMenu.js.map +0 -1
  358. package/dist/src/classes/RoleSelectMenu.d.ts.map +0 -1
  359. package/dist/src/classes/RoleSelectMenu.js +0 -13
  360. package/dist/src/classes/RoleSelectMenu.js.map +0 -1
  361. package/dist/src/classes/Row.d.ts +0 -25
  362. package/dist/src/classes/Row.d.ts.map +0 -1
  363. package/dist/src/classes/Row.js.map +0 -1
  364. package/dist/src/classes/StringSelectMenu.d.ts +0 -13
  365. package/dist/src/classes/StringSelectMenu.d.ts.map +0 -1
  366. package/dist/src/classes/StringSelectMenu.js +0 -12
  367. package/dist/src/classes/StringSelectMenu.js.map +0 -1
  368. package/dist/src/classes/TextInput.d.ts.map +0 -1
  369. package/dist/src/classes/TextInput.js.map +0 -1
  370. package/dist/src/classes/UserSelectMenu.d.ts.map +0 -1
  371. package/dist/src/classes/UserSelectMenu.js +0 -13
  372. package/dist/src/classes/UserSelectMenu.js.map +0 -1
  373. package/dist/src/createHandle.d.ts +0 -20
  374. package/dist/src/createHandle.d.ts.map +0 -1
  375. package/dist/src/createHandle.js +0 -57
  376. package/dist/src/createHandle.js.map +0 -1
  377. package/dist/src/factories/channelFactory.d.ts.map +0 -1
  378. package/dist/src/factories/channelFactory.js.map +0 -1
  379. package/dist/src/types/messagePayload.d.ts +0 -37
  380. package/dist/src/types/messagePayload.d.ts.map +0 -1
  381. package/dist/src/types/messagePayload.js +0 -2
  382. package/dist/src/types/messagePayload.js.map +0 -1
  383. package/dist/src/types.d.ts +0 -38
  384. package/dist/src/types.d.ts.map +0 -1
  385. package/dist/src/types.js +0 -2
  386. package/dist/src/types.js.map +0 -1
  387. package/dist/src/utils.d.ts +0 -27
  388. package/dist/src/utils.d.ts.map +0 -1
  389. package/dist/src/utils.js.map +0 -1
  390. /package/dist/src/{factories → functions}/channelFactory.js +0 -0
@@ -0,0 +1,27 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ export class Container extends BaseComponent {
4
+ type = ComponentType.Container;
5
+ isV2 = true;
6
+ /**
7
+ * The accent color of the container
8
+ */
9
+ accentColor;
10
+ /**
11
+ * Whether the container should be marked a spoiler
12
+ */
13
+ spoiler = false;
14
+ serialize = () => {
15
+ return {
16
+ type: this.type,
17
+ components: this.components.map((component) => component.serialize()),
18
+ accent_color: this.accentColor
19
+ ? typeof this.accentColor === "string"
20
+ ? Number.parseInt(this.accentColor.slice(1), 16)
21
+ : this.accentColor
22
+ : undefined,
23
+ spoiler: this.spoiler
24
+ };
25
+ };
26
+ }
27
+ //# sourceMappingURL=Container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/classes/components/Container.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAQhE,MAAM,OAAgB,SAAU,SAAQ,aAAa;IAC3C,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,IAAI,CAAA;IAWpB;;OAEG;IACH,WAAW,CAAiC;IAE5C;;OAEG;IACH,OAAO,GAAG,KAAK,CAAA;IAEf,SAAS,GAAG,GAA0B,EAAE;QACvC,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAC7C,SAAS,CAAC,SAAS,EAAE,CACQ;YAC9B,YAAY,EAAE,IAAI,CAAC,WAAW;gBAC7B,CAAC,CAAC,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ;oBACrC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;oBAChD,CAAC,CAAC,IAAI,CAAC,WAAW;gBACnB,CAAC,CAAC,SAAS;YACZ,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAA;IACF,CAAC,CAAA;CACD"}
@@ -0,0 +1,21 @@
1
+ import type { APIFileComponent } from "discord-api-types/v10";
2
+ import { ComponentType } from "discord-api-types/v10";
3
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
4
+ /**
5
+ * Each file component can only display 1 attached file, but you can upload multiple files and add them to different file components within your payload.
6
+ */
7
+ export declare class File extends BaseComponent {
8
+ readonly type: ComponentType.File;
9
+ readonly isV2 = true;
10
+ /**
11
+ * The attachment to display in the file component.
12
+ */
13
+ file: `attachment://${string}`;
14
+ /**
15
+ * Whether the file should be displayed as a spoiler.
16
+ */
17
+ spoiler: boolean;
18
+ constructor(file: `attachment://${string}`, spoiler?: boolean);
19
+ serialize: () => APIFileComponent;
20
+ }
21
+ //# sourceMappingURL=File.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/File.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE;;GAEG;AACH,qBAAa,IAAK,SAAQ,aAAa;IACtC,QAAQ,CAAC,IAAI,qBAA8B;IAC3C,QAAQ,CAAC,IAAI,QAAO;IAEpB;;OAEG;IACH,IAAI,EAAE,gBAAgB,MAAM,EAAE,CAAA;IAE9B;;OAEG;IACH,OAAO,UAAQ;gBAEH,IAAI,EAAE,gBAAgB,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,OAAO;IAM7D,SAAS,QAAO,gBAAgB,CAS/B;CACD"}
@@ -0,0 +1,33 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ /**
4
+ * Each file component can only display 1 attached file, but you can upload multiple files and add them to different file components within your payload.
5
+ */
6
+ export class File extends BaseComponent {
7
+ type = ComponentType.File;
8
+ isV2 = true;
9
+ /**
10
+ * The attachment to display in the file component.
11
+ */
12
+ file;
13
+ /**
14
+ * Whether the file should be displayed as a spoiler.
15
+ */
16
+ spoiler = false;
17
+ constructor(file, spoiler) {
18
+ super();
19
+ this.file = file;
20
+ this.spoiler = spoiler ?? false;
21
+ }
22
+ serialize = () => {
23
+ return {
24
+ type: ComponentType.File,
25
+ id: this.id,
26
+ file: {
27
+ url: this.file
28
+ },
29
+ spoiler: this.spoiler
30
+ };
31
+ };
32
+ }
33
+ //# sourceMappingURL=File.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../src/classes/components/File.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,aAAa;IAC7B,IAAI,GAAG,aAAa,CAAC,IAAa,CAAA;IAClC,IAAI,GAAG,IAAI,CAAA;IAEpB;;OAEG;IACH,IAAI,CAA0B;IAE9B;;OAEG;IACH,OAAO,GAAG,KAAK,CAAA;IAEf,YAAY,IAA8B,EAAE,OAAiB;QAC5D,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,KAAK,CAAA;IAChC,CAAC;IAED,SAAS,GAAG,GAAqB,EAAE;QAClC,OAAO;YACN,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE;gBACL,GAAG,EAAE,IAAI,CAAC,IAAI;aACd;YACD,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAA;IACF,CAAC,CAAA;CACD"}
@@ -0,0 +1,27 @@
1
+ import { type APIMediaGalleryComponent, ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ /**
4
+ * A media gallery component can display between 1 and 10 images.
5
+ * Each image can be a direct online URL or an attachment://<name> reference.
6
+ */
7
+ export declare abstract class MediaGallery extends BaseComponent {
8
+ readonly type: ComponentType.MediaGallery;
9
+ readonly isV2 = true;
10
+ abstract items: {
11
+ /**
12
+ * The URL of the image. This can either be a direct online URL or an attachment://<name> reference
13
+ */
14
+ url: string;
15
+ /**
16
+ * The alt text for the image.
17
+ */
18
+ description?: string;
19
+ /**
20
+ * Whether the image is a spoiler.
21
+ * @default false
22
+ */
23
+ spoiler?: boolean;
24
+ }[];
25
+ serialize: () => APIMediaGalleryComponent;
26
+ }
27
+ //# sourceMappingURL=MediaGallery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaGallery.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/MediaGallery.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,EAC7B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE;;;GAGG;AACH,8BAAsB,YAAa,SAAQ,aAAa;IACvD,QAAQ,CAAC,IAAI,6BAAsC;IACnD,QAAQ,CAAC,IAAI,QAAO;IAEpB,QAAQ,CAAC,KAAK,EAAE;QACf;;WAEG;QACH,GAAG,EAAE,MAAM,CAAA;QACX;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB;;;WAGG;QACH,OAAO,CAAC,EAAE,OAAO,CAAA;KACjB,EAAE,CAAA;IAEH,SAAS,QAAO,wBAAwB,CAevC;CACD"}
@@ -0,0 +1,27 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ /**
4
+ * A media gallery component can display between 1 and 10 images.
5
+ * Each image can be a direct online URL or an attachment://<name> reference.
6
+ */
7
+ export class MediaGallery extends BaseComponent {
8
+ type = ComponentType.MediaGallery;
9
+ isV2 = true;
10
+ serialize = () => {
11
+ if (this.items.length < 1 || this.items.length > 10) {
12
+ throw new Error("MediaGallery must have between 1 and 10 items");
13
+ }
14
+ return {
15
+ type: ComponentType.MediaGallery,
16
+ id: this.id,
17
+ items: this.items.map((item) => ({
18
+ media: {
19
+ url: item.url
20
+ },
21
+ description: item.description,
22
+ spoiler: item.spoiler
23
+ }))
24
+ };
25
+ };
26
+ }
27
+ //# sourceMappingURL=MediaGallery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../src/classes/components/MediaGallery.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE;;;GAGG;AACH,MAAM,OAAgB,YAAa,SAAQ,aAAa;IAC9C,IAAI,GAAG,aAAa,CAAC,YAAqB,CAAA;IAC1C,IAAI,GAAG,IAAI,CAAA;IAkBpB,SAAS,GAAG,GAA6B,EAAE;QAC1C,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;YACrD,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;QACjE,CAAC;QACD,OAAO;YACN,IAAI,EAAE,aAAa,CAAC,YAAY;YAChC,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBAChC,KAAK,EAAE;oBACN,GAAG,EAAE,IAAI,CAAC,GAAG;iBACb;gBACD,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;aACrB,CAAC,CAAC;SACH,CAAA;IACF,CAAC,CAAA;CACD"}
@@ -1,10 +1,12 @@
1
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";
2
+ import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
3
+ import type { MentionableSelectMenuInteraction } from "../../internals/MentionableSelectMenuInteraction.js";
4
+ import type { ComponentData } from "../../types/index.js";
4
5
  export declare abstract class MentionableSelectMenu extends AnySelectMenu {
5
- type: ComponentType.MentionableSelect;
6
+ readonly type: ComponentType.MentionableSelect;
7
+ readonly isV2 = false;
6
8
  defaultValues?: APIMentionableSelectComponent["default_values"];
7
- abstract run(interaction: MentionableSelectMenuInteraction): Promise<void>;
9
+ run(interaction: MentionableSelectMenuInteraction, data: ComponentData): unknown | Promise<unknown>;
8
10
  serializeOptions(): {
9
11
  type: ComponentType.MentionableSelect;
10
12
  default_values: import("discord-api-types/v10").APISelectMenuDefaultValue<import("discord-api-types/v10").SelectMenuDefaultValueType.Role | import("discord-api-types/v10").SelectMenuDefaultValueType.User>[] | undefined;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentionableSelectMenu.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/MentionableSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,6BAA6B,EAClC,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAA;AAC3G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,8BAAsB,qBAAsB,SAAQ,aAAa;IAChE,QAAQ,CAAC,IAAI,kCAA2C;IACxD,QAAQ,CAAC,IAAI,SAAQ;IACrB,aAAa,CAAC,EAAE,6BAA6B,CAAC,gBAAgB,CAAC,CAAA;IAC/D,GAAG,CACF,WAAW,EAAE,gCAAgC,EAC7C,IAAI,EAAE,aAAa,GACjB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAO7B,gBAAgB;;;;CAMhB"}
@@ -1,8 +1,15 @@
1
1
  import { ComponentType } from "discord-api-types/v10";
2
- import { AnySelectMenu } from "../abstracts/AnySelectMenu.js";
2
+ import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
3
3
  export class MentionableSelectMenu extends AnySelectMenu {
4
4
  type = ComponentType.MentionableSelect;
5
+ isV2 = false;
5
6
  defaultValues;
7
+ run(interaction, data) {
8
+ // Random things to show the vars as used
9
+ typeof interaction === "string";
10
+ typeof data === "string";
11
+ return;
12
+ }
6
13
  serializeOptions() {
7
14
  return {
8
15
  type: this.type,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentionableSelectMenu.js","sourceRoot":"","sources":["../../../../src/classes/components/MentionableSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAIhE,MAAM,OAAgB,qBAAsB,SAAQ,aAAa;IACvD,IAAI,GAAG,aAAa,CAAC,iBAA0B,CAAA;IAC/C,IAAI,GAAG,KAAK,CAAA;IACrB,aAAa,CAAkD;IAC/D,GAAG,CACF,WAA6C,EAC7C,IAAmB;QAEnB,yCAAyC;QACzC,OAAO,WAAW,KAAK,QAAQ,CAAA;QAC/B,OAAO,IAAI,KAAK,QAAQ,CAAA;QACxB,OAAM;IACP,CAAC;IAED,gBAAgB;QACf,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,aAAa;SAClC,CAAA;IACF,CAAC;CACD"}
@@ -1,10 +1,12 @@
1
1
  import { type APIRoleSelectComponent, ComponentType } from "discord-api-types/v10";
2
- import { AnySelectMenu } from "../abstracts/AnySelectMenu.js";
3
- import type { RoleSelectMenuInteraction } from "../internals/RoleSelectMenuInteraction.js";
2
+ import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
3
+ import type { RoleSelectMenuInteraction } from "../../internals/RoleSelectMenuInteraction.js";
4
+ import type { ComponentData } from "../../types/index.js";
4
5
  export declare abstract class RoleSelectMenu extends AnySelectMenu {
5
- type: ComponentType.RoleSelect;
6
+ readonly type: ComponentType.RoleSelect;
7
+ readonly isV2 = false;
6
8
  defaultValues?: APIRoleSelectComponent["default_values"];
7
- abstract run(interaction: RoleSelectMenuInteraction): Promise<void>;
9
+ run(interaction: RoleSelectMenuInteraction, data: ComponentData): unknown | Promise<unknown>;
8
10
  serializeOptions(): {
9
11
  type: ComponentType.RoleSelect;
10
12
  default_values: import("discord-api-types/v10").APISelectMenuDefaultValue<import("discord-api-types/v10").SelectMenuDefaultValueType.Role>[] | undefined;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleSelectMenu.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/RoleSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,sBAAsB,EAC3B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAA;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,8BAAsB,cAAe,SAAQ,aAAa;IACzD,QAAQ,CAAC,IAAI,2BAAoC;IACjD,QAAQ,CAAC,IAAI,SAAQ;IACrB,aAAa,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAA;IACxD,GAAG,CACF,WAAW,EAAE,yBAAyB,EACtC,IAAI,EAAE,aAAa,GACjB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAO7B,gBAAgB;;;;CAMhB"}
@@ -0,0 +1,20 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
3
+ export class RoleSelectMenu extends AnySelectMenu {
4
+ type = ComponentType.RoleSelect;
5
+ isV2 = false;
6
+ defaultValues;
7
+ run(interaction, data) {
8
+ // Random things to show the vars as used
9
+ typeof interaction === "string";
10
+ typeof data === "string";
11
+ return;
12
+ }
13
+ serializeOptions() {
14
+ return {
15
+ type: this.type,
16
+ default_values: this.defaultValues
17
+ };
18
+ }
19
+ }
20
+ //# sourceMappingURL=RoleSelectMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleSelectMenu.js","sourceRoot":"","sources":["../../../../src/classes/components/RoleSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAIhE,MAAM,OAAgB,cAAe,SAAQ,aAAa;IAChD,IAAI,GAAG,aAAa,CAAC,UAAmB,CAAA;IACxC,IAAI,GAAG,KAAK,CAAA;IACrB,aAAa,CAA2C;IACxD,GAAG,CACF,WAAsC,EACtC,IAAmB;QAEnB,yCAAyC;QACzC,OAAO,WAAW,KAAK,QAAQ,CAAA;QAC/B,OAAO,IAAI,KAAK,QAAQ,CAAA;QACxB,OAAM;IACP,CAAC;IAED,gBAAgB;QACf,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,aAAa;SAClC,CAAA;IACF,CAAC;CACD"}
@@ -0,0 +1,29 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ import type { BaseMessageInteractiveComponent } from "../../abstracts/BaseMessageInteractiveComponent.js";
4
+ import type { BaseModalComponent } from "../../abstracts/BaseModalComponent.js";
5
+ export declare class Row<T extends BaseMessageInteractiveComponent | BaseModalComponent = BaseMessageInteractiveComponent> extends BaseComponent {
6
+ readonly type: ComponentType.ActionRow;
7
+ readonly isV2 = false;
8
+ /**
9
+ * The components in the action row
10
+ */
11
+ components: T[];
12
+ constructor(components?: T[]);
13
+ /**
14
+ * Add a component to the action row
15
+ * @param component The component to add
16
+ */
17
+ addComponent(component: T): void;
18
+ /**
19
+ * Remove a component from the action row
20
+ * @param component The component to remove
21
+ */
22
+ removeComponent(component: T): void;
23
+ /**
24
+ * Remove all components from the action row
25
+ */
26
+ removeAllComponents(): void;
27
+ serialize: () => ReturnType<BaseComponent["serialize"]>;
28
+ }
29
+ //# sourceMappingURL=Row.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/Row.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAA;AACzG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAE/E,qBAAa,GAAG,CACf,CAAC,SACE,+BAA+B,GAC/B,kBAAkB,GAAG,+BAA+B,CACtD,SAAQ,aAAa;IACtB,QAAQ,CAAC,IAAI,0BAAmC;IAChD,QAAQ,CAAC,IAAI,SAAQ;IAErB;;OAEG;IACH,UAAU,EAAE,CAAC,EAAE,CAAK;gBAER,UAAU,CAAC,EAAE,CAAC,EAAE;IAK5B;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,CAAC;IAIzB;;;OAGG;IACH,eAAe,CAAC,SAAS,EAAE,CAAC;IAM5B;;OAEG;IACH,mBAAmB;IAInB,SAAS,QAAO,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAQrD;CACD"}
@@ -1,9 +1,14 @@
1
- export class Row {
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ export class Row extends BaseComponent {
4
+ type = ComponentType.ActionRow;
5
+ isV2 = false;
2
6
  /**
3
7
  * The components in the action row
4
8
  */
5
9
  components = [];
6
10
  constructor(components) {
11
+ super();
7
12
  if (components)
8
13
  this.components = components;
9
14
  }
@@ -32,9 +37,10 @@ export class Row {
32
37
  }
33
38
  serialize = () => {
34
39
  return {
35
- type: 1,
40
+ type: ComponentType.ActionRow,
36
41
  components: this.components.map((component) => component.serialize())
37
42
  };
43
+ // god i hate these types
38
44
  };
39
45
  }
40
46
  //# sourceMappingURL=Row.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Row.js","sourceRoot":"","sources":["../../../../src/classes/components/Row.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAIhE,MAAM,OAAO,GAIX,SAAQ,aAAa;IACb,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,KAAK,CAAA;IAErB;;OAEG;IACH,UAAU,GAAQ,EAAE,CAAA;IAEpB,YAAY,UAAgB;QAC3B,KAAK,EAAE,CAAA;QACP,IAAI,UAAU;YAAE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC7C,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,SAAY;QACxB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAChC,CAAC;IAED;;;OAGG;IACH,eAAe,CAAC,SAAY;QAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QAChD,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE,OAAM;QACxB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IACjC,CAAC;IAED;;OAEG;IACH,mBAAmB;QAClB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAA;IACrB,CAAC;IAED,SAAS,GAAG,GAA2C,EAAE;QACxD,OAAO;YACN,IAAI,EAAE,aAAa,CAAC,SAAS;YAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;SAGhB,CAAA;QACtD,yBAAyB;IAC1B,CAAC,CAAA;CACD"}
@@ -0,0 +1,22 @@
1
+ import { type APISectionComponent, ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ import type { Button, LinkButton } from "./Button.js";
4
+ import type { TextDisplay } from "./TextDisplay.js";
5
+ import type { Thumbnail } from "./Thumbnail.js";
6
+ export declare abstract class Section extends BaseComponent {
7
+ readonly type: ComponentType.Section;
8
+ readonly isV2 = true;
9
+ /**
10
+ * This is the main text that will be displayed in the section.
11
+ * You can have 1-3 TextDisplays in a Section
12
+ */
13
+ abstract components: TextDisplay[];
14
+ /**
15
+ * The Thumbnail or Button that will be displayed to the right of the main text.
16
+ * You can only have 1 Thumbnail or Button in a Section.
17
+ * If you don't want an accessory, you should be just using the TextDisplay directly.
18
+ */
19
+ abstract accessory: Thumbnail | Button | LinkButton;
20
+ serialize: () => APISectionComponent;
21
+ }
22
+ //# sourceMappingURL=Section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/Section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,8BAAsB,OAAQ,SAAQ,aAAa;IAClD,QAAQ,CAAC,IAAI,wBAAiC;IAC9C,QAAQ,CAAC,IAAI,QAAO;IAEpB;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,WAAW,EAAE,CAAA;IAElC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,CAAA;IAEnD,SAAS,QAAO,mBAAmB,CAOlC;CACD"}
@@ -0,0 +1,15 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ export class Section extends BaseComponent {
4
+ type = ComponentType.Section;
5
+ isV2 = true;
6
+ serialize = () => {
7
+ return {
8
+ type: this.type,
9
+ id: this.id,
10
+ components: this.components.map((component) => component.serialize()),
11
+ accessory: this.accessory.serialize()
12
+ };
13
+ };
14
+ }
15
+ //# sourceMappingURL=Section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.js","sourceRoot":"","sources":["../../../../src/classes/components/Section.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAKhE,MAAM,OAAgB,OAAQ,SAAQ,aAAa;IACzC,IAAI,GAAG,aAAa,CAAC,OAAgB,CAAA;IACrC,IAAI,GAAG,IAAI,CAAA;IAepB,SAAS,GAAG,GAAwB,EAAE;QACrC,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;YACrE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;SACrC,CAAA;IACF,CAAC,CAAA;CACD"}
@@ -0,0 +1,22 @@
1
+ import { type APISeparatorComponent, ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ export declare class Separator extends BaseComponent {
4
+ readonly type: ComponentType.Separator;
5
+ readonly isV2 = true;
6
+ /**
7
+ * Whether a visual divider should be displayed in the component
8
+ */
9
+ divider: boolean;
10
+ /**
11
+ * The size of the separator's padding
12
+ * Either "small" or "large"
13
+ * @default "small"
14
+ */
15
+ spacing: 1 | 2 | "small" | "large";
16
+ constructor(options?: {
17
+ spacing?: typeof Separator.prototype.spacing;
18
+ divider?: typeof Separator.prototype.divider;
19
+ });
20
+ serialize: () => APISeparatorComponent;
21
+ }
22
+ //# sourceMappingURL=Separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/Separator.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,qBAAqB,EAC1B,aAAa,EAEb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,qBAAa,SAAU,SAAQ,aAAa;IAC3C,QAAQ,CAAC,IAAI,0BAAmC;IAChD,QAAQ,CAAC,IAAI,QAAO;IAEpB;;OAEG;IACH,OAAO,UAAO;IAEd;;;;OAIG;IACH,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,OAAO,CAAU;gBAG3C,OAAO,GAAE;QACR,OAAO,CAAC,EAAE,OAAO,SAAS,CAAC,SAAS,CAAC,OAAO,CAAA;QAC5C,OAAO,CAAC,EAAE,OAAO,SAAS,CAAC,SAAS,CAAC,OAAO,CAAA;KACvC;IAOP,SAAS,QAAO,qBAAqB,CAWpC;CACD"}
@@ -0,0 +1,33 @@
1
+ import { ComponentType, SeparatorSpacingSize } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ export class Separator extends BaseComponent {
4
+ type = ComponentType.Separator;
5
+ isV2 = true;
6
+ /**
7
+ * Whether a visual divider should be displayed in the component
8
+ */
9
+ divider = true;
10
+ /**
11
+ * The size of the separator's padding
12
+ * Either "small" or "large"
13
+ * @default "small"
14
+ */
15
+ spacing = "small"; // integers here because its technically that on the API
16
+ constructor(options = {}) {
17
+ super();
18
+ this.spacing = options.spacing ?? "small";
19
+ this.divider = options.divider ?? true;
20
+ }
21
+ serialize = () => {
22
+ return {
23
+ type: this.type,
24
+ divider: this.divider,
25
+ spacing: typeof this.spacing === "number"
26
+ ? this.spacing
27
+ : this.spacing === "small"
28
+ ? SeparatorSpacingSize.Small
29
+ : SeparatorSpacingSize.Large
30
+ };
31
+ };
32
+ }
33
+ //# sourceMappingURL=Separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.js","sourceRoot":"","sources":["../../../../src/classes/components/Separator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,oBAAoB,EACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,MAAM,OAAO,SAAU,SAAQ,aAAa;IAClC,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,IAAI,CAAA;IAEpB;;OAEG;IACH,OAAO,GAAG,IAAI,CAAA;IAEd;;;;OAIG;IACH,OAAO,GAA8B,OAAO,CAAA,CAAC,wDAAwD;IAErG,YACC,UAGI,EAAE;QAEN,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAA;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,IAAI,CAAA;IACvC,CAAC;IAED,SAAS,GAAG,GAA0B,EAAE;QACvC,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EACN,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ;gBAC/B,CAAC,CAAC,IAAI,CAAC,OAAO;gBACd,CAAC,CAAC,IAAI,CAAC,OAAO,KAAK,OAAO;oBACzB,CAAC,CAAC,oBAAoB,CAAC,KAAK;oBAC5B,CAAC,CAAC,oBAAoB,CAAC,KAAK;SAC/B,CAAA;IACF,CAAC,CAAA;CACD"}
@@ -0,0 +1,15 @@
1
+ import { type APIStringSelectComponent, ComponentType } from "discord-api-types/v10";
2
+ import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
3
+ import type { StringSelectMenuInteraction } from "../../internals/StringSelectMenuInteraction.js";
4
+ import type { ComponentData } from "../../types/index.js";
5
+ export declare abstract class StringSelectMenu extends AnySelectMenu {
6
+ readonly type: ComponentType.StringSelect;
7
+ readonly isV2 = false;
8
+ abstract options: APIStringSelectComponent["options"];
9
+ run(interaction: StringSelectMenuInteraction, data: ComponentData): unknown | Promise<unknown>;
10
+ serializeOptions(): {
11
+ type: ComponentType.StringSelect;
12
+ options: import("discord-api-types/v10").APISelectMenuOption[];
13
+ };
14
+ }
15
+ //# sourceMappingURL=StringSelectMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StringSelectMenu.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/StringSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,EAC7B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAA;AACjG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,8BAAsB,gBAAiB,SAAQ,aAAa;IAC3D,QAAQ,CAAC,IAAI,6BAAsC;IACnD,QAAQ,CAAC,IAAI,SAAQ;IACrB,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAA;IACrD,GAAG,CACF,WAAW,EAAE,2BAA2B,EACxC,IAAI,EAAE,aAAa,GACjB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAO7B,gBAAgB;;;;CAMhB"}
@@ -0,0 +1,19 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
3
+ export class StringSelectMenu extends AnySelectMenu {
4
+ type = ComponentType.StringSelect;
5
+ isV2 = false;
6
+ run(interaction, data) {
7
+ // Random things to show the vars as used
8
+ typeof interaction === "string";
9
+ typeof data === "string";
10
+ return;
11
+ }
12
+ serializeOptions() {
13
+ return {
14
+ type: this.type,
15
+ options: this.options
16
+ };
17
+ }
18
+ }
19
+ //# sourceMappingURL=StringSelectMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StringSelectMenu.js","sourceRoot":"","sources":["../../../../src/classes/components/StringSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAIhE,MAAM,OAAgB,gBAAiB,SAAQ,aAAa;IAClD,IAAI,GAAG,aAAa,CAAC,YAAqB,CAAA;IAC1C,IAAI,GAAG,KAAK,CAAA;IAErB,GAAG,CACF,WAAwC,EACxC,IAAmB;QAEnB,yCAAyC;QACzC,OAAO,WAAW,KAAK,QAAQ,CAAA;QAC/B,OAAO,IAAI,KAAK,QAAQ,CAAA;QACxB,OAAM;IACP,CAAC;IAED,gBAAgB;QACf,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAA;IACF,CAAC;CACD"}
@@ -0,0 +1,10 @@
1
+ import { type APITextDisplayComponent, ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ export declare class TextDisplay extends BaseComponent {
4
+ readonly type: ComponentType.TextDisplay;
5
+ readonly isV2 = true;
6
+ content: string;
7
+ constructor(content: string);
8
+ serialize: () => APITextDisplayComponent;
9
+ }
10
+ //# sourceMappingURL=TextDisplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextDisplay.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/TextDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,uBAAuB,EAC5B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,qBAAa,WAAY,SAAQ,aAAa;IAC7C,QAAQ,CAAC,IAAI,4BAAqC;IAClD,QAAQ,CAAC,IAAI,QAAO;IAEpB,OAAO,EAAE,MAAM,CAAA;gBAEH,OAAO,EAAE,MAAM;IAK3B,SAAS,QAAO,uBAAuB,CAMtC;CACD"}
@@ -0,0 +1,19 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ export class TextDisplay extends BaseComponent {
4
+ type = ComponentType.TextDisplay;
5
+ isV2 = true;
6
+ content;
7
+ constructor(content) {
8
+ super();
9
+ this.content = content;
10
+ }
11
+ serialize = () => {
12
+ return {
13
+ type: this.type,
14
+ id: this.id,
15
+ content: this.content
16
+ };
17
+ };
18
+ }
19
+ //# sourceMappingURL=TextDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextDisplay.js","sourceRoot":"","sources":["../../../../src/classes/components/TextDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,MAAM,OAAO,WAAY,SAAQ,aAAa;IACpC,IAAI,GAAG,aAAa,CAAC,WAAoB,CAAA;IACzC,IAAI,GAAG,IAAI,CAAA;IAEpB,OAAO,CAAQ;IAEf,YAAY,OAAe;QAC1B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACvB,CAAC;IAED,SAAS,GAAG,GAA4B,EAAE;QACzC,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAA;IACF,CAAC,CAAA;CACD"}
@@ -1,7 +1,8 @@
1
1
  import { type APITextInputComponent, ComponentType, TextInputStyle } from "discord-api-types/v10";
2
- import { BaseComponent } from "../abstracts/BaseComponent.js";
3
- export declare abstract class TextInput extends BaseComponent {
4
- type: ComponentType;
2
+ import { BaseModalComponent } from "../../abstracts/BaseModalComponent.js";
3
+ export declare abstract class TextInput extends BaseModalComponent {
4
+ readonly type: ComponentType.TextInput;
5
+ readonly isV2 = false;
5
6
  /**
6
7
  * The custom ID of the text input
7
8
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/TextInput.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,qBAAqB,EAC1B,aAAa,EACb,cAAc,EACd,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAE1E,8BAAsB,SAAU,SAAQ,kBAAkB;IACzD,QAAQ,CAAC,IAAI,0BAAmC;IAChD,QAAQ,CAAC,IAAI,SAAQ;IAErB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAEzB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IAEtB;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAuB;IAE5C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,SAAS,QAAO,qBAAqB,CAYpC;CACD"}
@@ -1,7 +1,8 @@
1
1
  import { ComponentType, TextInputStyle } from "discord-api-types/v10";
2
- import { BaseComponent } from "../abstracts/BaseComponent.js";
3
- export class TextInput extends BaseComponent {
2
+ import { BaseModalComponent } from "../../abstracts/BaseModalComponent.js";
3
+ export class TextInput extends BaseModalComponent {
4
4
  type = ComponentType.TextInput;
5
+ isV2 = false;
5
6
  /**
6
7
  * The style of the text input
7
8
  * @default TextInputStyle.Short
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../src/classes/components/TextInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,cAAc,EACd,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAE1E,MAAM,OAAgB,SAAU,SAAQ,kBAAkB;IAChD,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,KAAK,CAAA;IAYrB;;;OAGG;IACH,KAAK,GAAmB,cAAc,CAAC,KAAK,CAAA;IAE5C;;OAEG;IACH,SAAS,CAAS;IAElB;;OAEG;IACH,SAAS,CAAS;IAElB;;OAEG;IACH,QAAQ,CAAU;IAElB;;OAEG;IACH,KAAK,CAAS;IAEd;;OAEG;IACH,WAAW,CAAS;IAEpB,SAAS,GAAG,GAA0B,EAAE;QACvC,OAAO;YACN,IAAI,EAAE,aAAa,CAAC,SAAS;YAC7B,SAAS,EAAE,IAAI,CAAC,QAAQ;YACxB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,UAAU,EAAE,IAAI,CAAC,SAAS;YAC1B,UAAU,EAAE,IAAI,CAAC,SAAS;YAC1B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAA;IACF,CAAC,CAAA;CACD"}
@@ -0,0 +1,13 @@
1
+ import type { APIThumbnailComponent } from "discord-api-types/v10";
2
+ import { ComponentType } from "discord-api-types/v10";
3
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
4
+ export declare abstract class Thumbnail extends BaseComponent {
5
+ readonly type: ComponentType.Thumbnail;
6
+ readonly isV2 = true;
7
+ /**
8
+ * The URL of the thumbnail. This can either be a direct online URL or an attachment://<name> reference
9
+ */
10
+ abstract url: string;
11
+ serialize: () => APIThumbnailComponent;
12
+ }
13
+ //# sourceMappingURL=Thumbnail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Thumbnail.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/Thumbnail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,8BAAsB,SAAU,SAAQ,aAAa;IACpD,QAAQ,CAAC,IAAI,0BAAmC;IAChD,QAAQ,CAAC,IAAI,QAAO;IAEpB;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IAEpB,SAAS,QAAO,qBAAqB,CAQpC;CACD"}
@@ -0,0 +1,16 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ export class Thumbnail extends BaseComponent {
4
+ type = ComponentType.Thumbnail;
5
+ isV2 = true;
6
+ serialize = () => {
7
+ return {
8
+ type: this.type,
9
+ id: this.id,
10
+ media: {
11
+ url: this.url
12
+ }
13
+ };
14
+ };
15
+ }
16
+ //# sourceMappingURL=Thumbnail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Thumbnail.js","sourceRoot":"","sources":["../../../../src/classes/components/Thumbnail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,MAAM,OAAgB,SAAU,SAAQ,aAAa;IAC3C,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,IAAI,CAAA;IAOpB,SAAS,GAAG,GAA0B,EAAE;QACvC,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE;gBACN,GAAG,EAAE,IAAI,CAAC,GAAG;aACb;SACD,CAAA;IACF,CAAC,CAAA;CACD"}
@@ -1,10 +1,12 @@
1
1
  import { type APIUserSelectComponent, ComponentType } from "discord-api-types/v10";
2
- import { AnySelectMenu } from "../abstracts/AnySelectMenu.js";
3
- import type { UserSelectMenuInteraction } from "../internals/UserSelectMenuInteraction.js";
2
+ import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
3
+ import type { UserSelectMenuInteraction } from "../../internals/UserSelectMenuInteraction.js";
4
+ import type { ComponentData } from "../../types/index.js";
4
5
  export declare abstract class UserSelectMenu extends AnySelectMenu {
5
- type: ComponentType.UserSelect;
6
+ readonly type: ComponentType.UserSelect;
7
+ readonly isV2 = false;
6
8
  defaultValues?: APIUserSelectComponent["default_values"];
7
- abstract run(interaction: UserSelectMenuInteraction): Promise<void>;
9
+ run(interaction: UserSelectMenuInteraction, data: ComponentData): unknown | Promise<unknown>;
8
10
  serializeOptions(): {
9
11
  type: ComponentType.UserSelect;
10
12
  default_values: import("discord-api-types/v10").APISelectMenuDefaultValue<import("discord-api-types/v10").SelectMenuDefaultValueType.User>[] | undefined;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserSelectMenu.d.ts","sourceRoot":"","sources":["../../../../src/classes/components/UserSelectMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,sBAAsB,EAC3B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAA;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,8BAAsB,cAAe,SAAQ,aAAa;IACzD,QAAQ,CAAC,IAAI,2BAAoC;IACjD,QAAQ,CAAC,IAAI,SAAQ;IACrB,aAAa,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAA;IACxD,GAAG,CACF,WAAW,EAAE,yBAAyB,EACtC,IAAI,EAAE,aAAa,GACjB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAO7B,gBAAgB;;;;CAMhB"}