carbon-proxy 0.14.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 (520) hide show
  1. package/README.md +237 -0
  2. package/dist/package.json +43 -0
  3. package/dist/src/abstracts/AnySelectMenu.d.ts +40 -0
  4. package/dist/src/abstracts/AnySelectMenu.d.ts.map +1 -0
  5. package/dist/src/abstracts/AnySelectMenu.js +41 -0
  6. package/dist/src/abstracts/AnySelectMenu.js.map +1 -0
  7. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts +12 -0
  8. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts.map +1 -0
  9. package/dist/src/abstracts/AnySelectMenuInteraction.js +19 -0
  10. package/dist/src/abstracts/AnySelectMenuInteraction.js.map +1 -0
  11. package/dist/src/abstracts/Base.d.ts +10 -0
  12. package/dist/src/abstracts/Base.d.ts.map +1 -0
  13. package/dist/src/abstracts/Base.js +11 -0
  14. package/dist/src/abstracts/Base.js.map +1 -0
  15. package/dist/src/abstracts/BaseChannel.d.ts +60 -0
  16. package/dist/src/abstracts/BaseChannel.d.ts.map +1 -0
  17. package/dist/src/abstracts/BaseChannel.js +90 -0
  18. package/dist/src/abstracts/BaseChannel.js.map +1 -0
  19. package/dist/src/abstracts/BaseCommand.d.ts +77 -0
  20. package/dist/src/abstracts/BaseCommand.d.ts.map +1 -0
  21. package/dist/src/abstracts/BaseCommand.js +127 -0
  22. package/dist/src/abstracts/BaseCommand.js.map +1 -0
  23. package/dist/src/abstracts/BaseComponent.d.ts +20 -0
  24. package/dist/src/abstracts/BaseComponent.d.ts.map +1 -0
  25. package/dist/src/abstracts/BaseComponent.js +10 -0
  26. package/dist/src/abstracts/BaseComponent.js.map +1 -0
  27. package/dist/src/abstracts/BaseComponentInteraction.d.ts +18 -0
  28. package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -0
  29. package/dist/src/abstracts/BaseComponentInteraction.js +41 -0
  30. package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -0
  31. package/dist/src/abstracts/BaseGuildChannel.d.ts +61 -0
  32. package/dist/src/abstracts/BaseGuildChannel.d.ts.map +1 -0
  33. package/dist/src/abstracts/BaseGuildChannel.js +125 -0
  34. package/dist/src/abstracts/BaseGuildChannel.js.map +1 -0
  35. package/dist/src/abstracts/BaseGuildTextChannel.d.ts +53 -0
  36. package/dist/src/abstracts/BaseGuildTextChannel.d.ts.map +1 -0
  37. package/dist/src/abstracts/BaseGuildTextChannel.js +89 -0
  38. package/dist/src/abstracts/BaseGuildTextChannel.js.map +1 -0
  39. package/dist/src/abstracts/BaseInteraction.d.ts +166 -0
  40. package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -0
  41. package/dist/src/abstracts/BaseInteraction.js +274 -0
  42. package/dist/src/abstracts/BaseInteraction.js.map +1 -0
  43. package/dist/src/abstracts/BaseListener.d.ts +13 -0
  44. package/dist/src/abstracts/BaseListener.d.ts.map +1 -0
  45. package/dist/src/abstracts/BaseListener.js +8 -0
  46. package/dist/src/abstracts/BaseListener.js.map +1 -0
  47. package/dist/src/abstracts/BaseMessageInteractiveComponent.d.ts +41 -0
  48. package/dist/src/abstracts/BaseMessageInteractiveComponent.d.ts.map +1 -0
  49. package/dist/src/abstracts/BaseMessageInteractiveComponent.js +35 -0
  50. package/dist/src/abstracts/BaseMessageInteractiveComponent.js.map +1 -0
  51. package/dist/src/abstracts/BaseModalComponent.d.ts +9 -0
  52. package/dist/src/abstracts/BaseModalComponent.d.ts.map +1 -0
  53. package/dist/src/abstracts/BaseModalComponent.js +5 -0
  54. package/dist/src/abstracts/BaseModalComponent.js.map +1 -0
  55. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts +58 -0
  56. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts.map +1 -0
  57. package/dist/src/abstracts/GuildThreadOnlyChannel.js +102 -0
  58. package/dist/src/abstracts/GuildThreadOnlyChannel.js.map +1 -0
  59. package/dist/src/abstracts/Plugin.d.ts +49 -0
  60. package/dist/src/abstracts/Plugin.d.ts.map +1 -0
  61. package/dist/src/abstracts/Plugin.js +6 -0
  62. package/dist/src/abstracts/Plugin.js.map +1 -0
  63. package/dist/src/adapters/bun/index.d.ts +13 -0
  64. package/dist/src/adapters/bun/index.d.ts.map +1 -0
  65. package/dist/src/adapters/bun/index.js +16 -0
  66. package/dist/src/adapters/bun/index.js.map +1 -0
  67. package/dist/src/adapters/fetch/index.d.ts +11 -0
  68. package/dist/src/adapters/fetch/index.d.ts.map +1 -0
  69. package/dist/src/adapters/fetch/index.js +50 -0
  70. package/dist/src/adapters/fetch/index.js.map +1 -0
  71. package/dist/src/adapters/node/index.d.ts +13 -0
  72. package/dist/src/adapters/node/index.d.ts.map +1 -0
  73. package/dist/src/adapters/node/index.js +17 -0
  74. package/dist/src/adapters/node/index.js.map +1 -0
  75. package/dist/src/classes/Client.d.ts +253 -0
  76. package/dist/src/classes/Client.d.ts.map +1 -0
  77. package/dist/src/classes/Client.js +419 -0
  78. package/dist/src/classes/Client.js.map +1 -0
  79. package/dist/src/classes/Command.d.ts +44 -0
  80. package/dist/src/classes/Command.d.ts.map +1 -0
  81. package/dist/src/classes/Command.js +53 -0
  82. package/dist/src/classes/Command.js.map +1 -0
  83. package/dist/src/classes/CommandWithSubcommandGroups.d.ts +22 -0
  84. package/dist/src/classes/CommandWithSubcommandGroups.d.ts.map +1 -0
  85. package/dist/src/classes/CommandWithSubcommandGroups.js +27 -0
  86. package/dist/src/classes/CommandWithSubcommandGroups.js.map +1 -0
  87. package/dist/src/classes/CommandWithSubcommands.d.ts +19 -0
  88. package/dist/src/classes/CommandWithSubcommands.d.ts.map +1 -0
  89. package/dist/src/classes/CommandWithSubcommands.js +19 -0
  90. package/dist/src/classes/CommandWithSubcommands.js.map +1 -0
  91. package/dist/src/classes/Embed.d.ts +61 -0
  92. package/dist/src/classes/Embed.d.ts.map +1 -0
  93. package/dist/src/classes/Embed.js +75 -0
  94. package/dist/src/classes/Embed.js.map +1 -0
  95. package/dist/src/classes/Listener.d.ts +392 -0
  96. package/dist/src/classes/Listener.d.ts.map +1 -0
  97. package/dist/src/classes/Listener.js +1034 -0
  98. package/dist/src/classes/Listener.js.map +1 -0
  99. package/dist/src/classes/Modal.d.ts +37 -0
  100. package/dist/src/classes/Modal.d.ts.map +1 -0
  101. package/dist/src/classes/Modal.js +28 -0
  102. package/dist/src/classes/Modal.js.map +1 -0
  103. package/dist/src/classes/RequestClient.d.ts +106 -0
  104. package/dist/src/classes/RequestClient.d.ts.map +1 -0
  105. package/dist/src/classes/RequestClient.js +451 -0
  106. package/dist/src/classes/RequestClient.js.map +1 -0
  107. package/dist/src/classes/components/Button.d.ts +52 -0
  108. package/dist/src/classes/components/Button.d.ts.map +1 -0
  109. package/dist/src/classes/components/Button.js +71 -0
  110. package/dist/src/classes/components/Button.js.map +1 -0
  111. package/dist/src/classes/components/ChannelSelectMenu.d.ts +17 -0
  112. package/dist/src/classes/components/ChannelSelectMenu.d.ts.map +1 -0
  113. package/dist/src/classes/components/ChannelSelectMenu.js +22 -0
  114. package/dist/src/classes/components/ChannelSelectMenu.js.map +1 -0
  115. package/dist/src/classes/components/Checkbox.d.ts +12 -0
  116. package/dist/src/classes/components/Checkbox.d.ts.map +1 -0
  117. package/dist/src/classes/components/Checkbox.js +20 -0
  118. package/dist/src/classes/components/Checkbox.js.map +1 -0
  119. package/dist/src/classes/components/CheckboxGroup.d.ts +24 -0
  120. package/dist/src/classes/components/CheckboxGroup.d.ts.map +1 -0
  121. package/dist/src/classes/components/CheckboxGroup.js +37 -0
  122. package/dist/src/classes/components/CheckboxGroup.js.map +1 -0
  123. package/dist/src/classes/components/Container.d.ts +28 -0
  124. package/dist/src/classes/components/Container.d.ts.map +1 -0
  125. package/dist/src/classes/components/Container.js +38 -0
  126. package/dist/src/classes/components/Container.js.map +1 -0
  127. package/dist/src/classes/components/File.d.ts +21 -0
  128. package/dist/src/classes/components/File.d.ts.map +1 -0
  129. package/dist/src/classes/components/File.js +36 -0
  130. package/dist/src/classes/components/File.js.map +1 -0
  131. package/dist/src/classes/components/FileUpload.d.ts +23 -0
  132. package/dist/src/classes/components/FileUpload.d.ts.map +1 -0
  133. package/dist/src/classes/components/FileUpload.js +36 -0
  134. package/dist/src/classes/components/FileUpload.js.map +1 -0
  135. package/dist/src/classes/components/Label.d.ts +31 -0
  136. package/dist/src/classes/components/Label.d.ts.map +1 -0
  137. package/dist/src/classes/components/Label.js +35 -0
  138. package/dist/src/classes/components/Label.js.map +1 -0
  139. package/dist/src/classes/components/MediaGallery.d.ts +22 -0
  140. package/dist/src/classes/components/MediaGallery.d.ts.map +1 -0
  141. package/dist/src/classes/components/MediaGallery.js +32 -0
  142. package/dist/src/classes/components/MediaGallery.js.map +1 -0
  143. package/dist/src/classes/components/MentionableSelectMenu.d.ts +15 -0
  144. package/dist/src/classes/components/MentionableSelectMenu.d.ts.map +1 -0
  145. package/dist/src/classes/components/MentionableSelectMenu.js +20 -0
  146. package/dist/src/classes/components/MentionableSelectMenu.js.map +1 -0
  147. package/dist/src/classes/components/RadioGroup.d.ts +24 -0
  148. package/dist/src/classes/components/RadioGroup.d.ts.map +1 -0
  149. package/dist/src/classes/components/RadioGroup.js +33 -0
  150. package/dist/src/classes/components/RadioGroup.js.map +1 -0
  151. package/dist/src/classes/components/RoleSelectMenu.d.ts +15 -0
  152. package/dist/src/classes/components/RoleSelectMenu.d.ts.map +1 -0
  153. package/dist/src/classes/components/RoleSelectMenu.js +20 -0
  154. package/dist/src/classes/components/RoleSelectMenu.js.map +1 -0
  155. package/dist/src/classes/components/Row.d.ts +28 -0
  156. package/dist/src/classes/components/Row.d.ts.map +1 -0
  157. package/dist/src/classes/components/Row.js +44 -0
  158. package/dist/src/classes/components/Row.js.map +1 -0
  159. package/dist/src/classes/components/Section.d.ts +23 -0
  160. package/dist/src/classes/components/Section.d.ts.map +1 -0
  161. package/dist/src/classes/components/Section.js +37 -0
  162. package/dist/src/classes/components/Section.js.map +1 -0
  163. package/dist/src/classes/components/Separator.d.ts +22 -0
  164. package/dist/src/classes/components/Separator.d.ts.map +1 -0
  165. package/dist/src/classes/components/Separator.js +33 -0
  166. package/dist/src/classes/components/Separator.js.map +1 -0
  167. package/dist/src/classes/components/StringSelectMenu.d.ts +15 -0
  168. package/dist/src/classes/components/StringSelectMenu.d.ts.map +1 -0
  169. package/dist/src/classes/components/StringSelectMenu.js +19 -0
  170. package/dist/src/classes/components/StringSelectMenu.js.map +1 -0
  171. package/dist/src/classes/components/TextDisplay.d.ts +10 -0
  172. package/dist/src/classes/components/TextDisplay.d.ts.map +1 -0
  173. package/dist/src/classes/components/TextDisplay.js +22 -0
  174. package/dist/src/classes/components/TextDisplay.js.map +1 -0
  175. package/dist/src/classes/components/TextInput.d.ts +53 -0
  176. package/dist/src/classes/components/TextInput.d.ts.map +1 -0
  177. package/dist/src/classes/components/TextInput.js +57 -0
  178. package/dist/src/classes/components/TextInput.js.map +1 -0
  179. package/dist/src/classes/components/Thumbnail.d.ts +14 -0
  180. package/dist/src/classes/components/Thumbnail.d.ts.map +1 -0
  181. package/dist/src/classes/components/Thumbnail.js +27 -0
  182. package/dist/src/classes/components/Thumbnail.js.map +1 -0
  183. package/dist/src/classes/components/UserSelectMenu.d.ts +15 -0
  184. package/dist/src/classes/components/UserSelectMenu.d.ts.map +1 -0
  185. package/dist/src/classes/components/UserSelectMenu.js +20 -0
  186. package/dist/src/classes/components/UserSelectMenu.js.map +1 -0
  187. package/dist/src/errors/BaseError.d.ts +3 -0
  188. package/dist/src/errors/BaseError.d.ts.map +1 -0
  189. package/dist/src/errors/BaseError.js +3 -0
  190. package/dist/src/errors/BaseError.js.map +1 -0
  191. package/dist/src/errors/DiscordError.d.ts +25 -0
  192. package/dist/src/errors/DiscordError.d.ts.map +1 -0
  193. package/dist/src/errors/DiscordError.js +31 -0
  194. package/dist/src/errors/DiscordError.js.map +1 -0
  195. package/dist/src/errors/RatelimitError.d.ts +15 -0
  196. package/dist/src/errors/RatelimitError.d.ts.map +1 -0
  197. package/dist/src/errors/RatelimitError.js +18 -0
  198. package/dist/src/errors/RatelimitError.js.map +1 -0
  199. package/dist/src/functions/channelFactory.d.ts +14 -0
  200. package/dist/src/functions/channelFactory.d.ts.map +1 -0
  201. package/dist/src/functions/channelFactory.js +39 -0
  202. package/dist/src/functions/channelFactory.js.map +1 -0
  203. package/dist/src/functions/enforceChoicesLimit.d.ts +3 -0
  204. package/dist/src/functions/enforceChoicesLimit.d.ts.map +1 -0
  205. package/dist/src/functions/enforceChoicesLimit.js +17 -0
  206. package/dist/src/functions/enforceChoicesLimit.js.map +1 -0
  207. package/dist/src/functions/errorsMapper.d.ts +14 -0
  208. package/dist/src/functions/errorsMapper.d.ts.map +1 -0
  209. package/dist/src/functions/errorsMapper.js +46 -0
  210. package/dist/src/functions/errorsMapper.js.map +1 -0
  211. package/dist/src/index.d.ts +93 -0
  212. package/dist/src/index.d.ts.map +1 -0
  213. package/dist/src/index.js +100 -0
  214. package/dist/src/index.js.map +1 -0
  215. package/dist/src/internals/AutocompleteInteraction.d.ts +43 -0
  216. package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -0
  217. package/dist/src/internals/AutocompleteInteraction.js +73 -0
  218. package/dist/src/internals/AutocompleteInteraction.js.map +1 -0
  219. package/dist/src/internals/ButtonInteraction.d.ts +8 -0
  220. package/dist/src/internals/ButtonInteraction.d.ts.map +1 -0
  221. package/dist/src/internals/ButtonInteraction.js +16 -0
  222. package/dist/src/internals/ButtonInteraction.js.map +1 -0
  223. package/dist/src/internals/ChannelSelectMenuInteraction.d.ts +8 -0
  224. package/dist/src/internals/ChannelSelectMenuInteraction.d.ts.map +1 -0
  225. package/dist/src/internals/ChannelSelectMenuInteraction.js +11 -0
  226. package/dist/src/internals/ChannelSelectMenuInteraction.js.map +1 -0
  227. package/dist/src/internals/CommandHandler.d.ts +13 -0
  228. package/dist/src/internals/CommandHandler.d.ts.map +1 -0
  229. package/dist/src/internals/CommandHandler.js +143 -0
  230. package/dist/src/internals/CommandHandler.js.map +1 -0
  231. package/dist/src/internals/CommandInteraction.d.ts +26 -0
  232. package/dist/src/internals/CommandInteraction.d.ts.map +1 -0
  233. package/dist/src/internals/CommandInteraction.js +60 -0
  234. package/dist/src/internals/CommandInteraction.js.map +1 -0
  235. package/dist/src/internals/ComponentHandler.d.ts +14 -0
  236. package/dist/src/internals/ComponentHandler.d.ts.map +1 -0
  237. package/dist/src/internals/ComponentHandler.js +183 -0
  238. package/dist/src/internals/ComponentHandler.js.map +1 -0
  239. package/dist/src/internals/EmojiHandler.d.ts +19 -0
  240. package/dist/src/internals/EmojiHandler.d.ts.map +1 -0
  241. package/dist/src/internals/EmojiHandler.js +34 -0
  242. package/dist/src/internals/EmojiHandler.js.map +1 -0
  243. package/dist/src/internals/EventHandler.d.ts +22 -0
  244. package/dist/src/internals/EventHandler.d.ts.map +1 -0
  245. package/dist/src/internals/EventHandler.js +23 -0
  246. package/dist/src/internals/EventHandler.js.map +1 -0
  247. package/dist/src/internals/EventQueue.d.ts +59 -0
  248. package/dist/src/internals/EventQueue.d.ts.map +1 -0
  249. package/dist/src/internals/EventQueue.js +131 -0
  250. package/dist/src/internals/EventQueue.js.map +1 -0
  251. package/dist/src/internals/FieldsHandler.d.ts +68 -0
  252. package/dist/src/internals/FieldsHandler.d.ts.map +1 -0
  253. package/dist/src/internals/FieldsHandler.js +146 -0
  254. package/dist/src/internals/FieldsHandler.js.map +1 -0
  255. package/dist/src/internals/MentionableSelectMenuInteraction.d.ts +9 -0
  256. package/dist/src/internals/MentionableSelectMenuInteraction.d.ts.map +1 -0
  257. package/dist/src/internals/MentionableSelectMenuInteraction.js +15 -0
  258. package/dist/src/internals/MentionableSelectMenuInteraction.js.map +1 -0
  259. package/dist/src/internals/ModalHandler.d.ts +17 -0
  260. package/dist/src/internals/ModalHandler.d.ts.map +1 -0
  261. package/dist/src/internals/ModalHandler.js +35 -0
  262. package/dist/src/internals/ModalHandler.js.map +1 -0
  263. package/dist/src/internals/ModalInteraction.d.ts +21 -0
  264. package/dist/src/internals/ModalInteraction.d.ts.map +1 -0
  265. package/dist/src/internals/ModalInteraction.js +41 -0
  266. package/dist/src/internals/ModalInteraction.js.map +1 -0
  267. package/dist/src/internals/OptionsHandler.d.ts +108 -0
  268. package/dist/src/internals/OptionsHandler.d.ts.map +1 -0
  269. package/dist/src/internals/OptionsHandler.js +237 -0
  270. package/dist/src/internals/OptionsHandler.js.map +1 -0
  271. package/dist/src/internals/RoleSelectMenuInteraction.d.ts +9 -0
  272. package/dist/src/internals/RoleSelectMenuInteraction.d.ts.map +1 -0
  273. package/dist/src/internals/RoleSelectMenuInteraction.js +14 -0
  274. package/dist/src/internals/RoleSelectMenuInteraction.js.map +1 -0
  275. package/dist/src/internals/StringSelectMenuInteraction.d.ts +9 -0
  276. package/dist/src/internals/StringSelectMenuInteraction.d.ts.map +1 -0
  277. package/dist/src/internals/StringSelectMenuInteraction.js +14 -0
  278. package/dist/src/internals/StringSelectMenuInteraction.js.map +1 -0
  279. package/dist/src/internals/TemporaryListenerManager.d.ts +20 -0
  280. package/dist/src/internals/TemporaryListenerManager.d.ts.map +1 -0
  281. package/dist/src/internals/TemporaryListenerManager.js +59 -0
  282. package/dist/src/internals/TemporaryListenerManager.js.map +1 -0
  283. package/dist/src/internals/UserSelectMenuInteraction.d.ts +9 -0
  284. package/dist/src/internals/UserSelectMenuInteraction.d.ts.map +1 -0
  285. package/dist/src/internals/UserSelectMenuInteraction.js +14 -0
  286. package/dist/src/internals/UserSelectMenuInteraction.js.map +1 -0
  287. package/dist/src/permissions.d.ts +56 -0
  288. package/dist/src/permissions.d.ts.map +1 -0
  289. package/dist/src/permissions.js +4 -0
  290. package/dist/src/permissions.js.map +1 -0
  291. package/dist/src/plugins/client-manager/ClientManager.d.ts +151 -0
  292. package/dist/src/plugins/client-manager/ClientManager.d.ts.map +1 -0
  293. package/dist/src/plugins/client-manager/ClientManager.js +253 -0
  294. package/dist/src/plugins/client-manager/ClientManager.js.map +1 -0
  295. package/dist/src/plugins/client-manager/index.d.ts +2 -0
  296. package/dist/src/plugins/client-manager/index.d.ts.map +1 -0
  297. package/dist/src/plugins/client-manager/index.js +2 -0
  298. package/dist/src/plugins/client-manager/index.js.map +1 -0
  299. package/dist/src/plugins/command-data/CommandDataPlugin.d.ts +16 -0
  300. package/dist/src/plugins/command-data/CommandDataPlugin.d.ts.map +1 -0
  301. package/dist/src/plugins/command-data/CommandDataPlugin.js +43 -0
  302. package/dist/src/plugins/command-data/CommandDataPlugin.js.map +1 -0
  303. package/dist/src/plugins/command-data/index.d.ts +2 -0
  304. package/dist/src/plugins/command-data/index.d.ts.map +1 -0
  305. package/dist/src/plugins/command-data/index.js +2 -0
  306. package/dist/src/plugins/command-data/index.js.map +1 -0
  307. package/dist/src/plugins/gateway/BabyCache.d.ts +16 -0
  308. package/dist/src/plugins/gateway/BabyCache.d.ts.map +1 -0
  309. package/dist/src/plugins/gateway/BabyCache.js +53 -0
  310. package/dist/src/plugins/gateway/BabyCache.js.map +1 -0
  311. package/dist/src/plugins/gateway/GatewayPlugin.d.ts +90 -0
  312. package/dist/src/plugins/gateway/GatewayPlugin.d.ts.map +1 -0
  313. package/dist/src/plugins/gateway/GatewayPlugin.js +516 -0
  314. package/dist/src/plugins/gateway/GatewayPlugin.js.map +1 -0
  315. package/dist/src/plugins/gateway/InteractionEventListener.d.ts +8 -0
  316. package/dist/src/plugins/gateway/InteractionEventListener.d.ts.map +1 -0
  317. package/dist/src/plugins/gateway/InteractionEventListener.js +9 -0
  318. package/dist/src/plugins/gateway/InteractionEventListener.js.map +1 -0
  319. package/dist/src/plugins/gateway/index.d.ts +7 -0
  320. package/dist/src/plugins/gateway/index.d.ts.map +1 -0
  321. package/dist/src/plugins/gateway/index.js +7 -0
  322. package/dist/src/plugins/gateway/index.js.map +1 -0
  323. package/dist/src/plugins/gateway/types.d.ts +130 -0
  324. package/dist/src/plugins/gateway/types.d.ts.map +1 -0
  325. package/dist/src/plugins/gateway/types.js +5 -0
  326. package/dist/src/plugins/gateway/types.js.map +1 -0
  327. package/dist/src/plugins/gateway/utils/heartbeat.d.ts +18 -0
  328. package/dist/src/plugins/gateway/utils/heartbeat.d.ts.map +1 -0
  329. package/dist/src/plugins/gateway/utils/heartbeat.js +33 -0
  330. package/dist/src/plugins/gateway/utils/heartbeat.js.map +1 -0
  331. package/dist/src/plugins/gateway/utils/monitor.d.ts +37 -0
  332. package/dist/src/plugins/gateway/utils/monitor.d.ts.map +1 -0
  333. package/dist/src/plugins/gateway/utils/monitor.js +88 -0
  334. package/dist/src/plugins/gateway/utils/monitor.js.map +1 -0
  335. package/dist/src/plugins/gateway/utils/payload.d.ts +24 -0
  336. package/dist/src/plugins/gateway/utils/payload.d.ts.map +1 -0
  337. package/dist/src/plugins/gateway/utils/payload.js +65 -0
  338. package/dist/src/plugins/gateway/utils/payload.js.map +1 -0
  339. package/dist/src/plugins/gateway/utils/rateLimit.d.ts +41 -0
  340. package/dist/src/plugins/gateway/utils/rateLimit.d.ts.map +1 -0
  341. package/dist/src/plugins/gateway/utils/rateLimit.js +61 -0
  342. package/dist/src/plugins/gateway/utils/rateLimit.js.map +1 -0
  343. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.d.ts +30 -0
  344. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.d.ts.map +1 -0
  345. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.js +80 -0
  346. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.js.map +1 -0
  347. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.d.ts +9 -0
  348. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.d.ts.map +1 -0
  349. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.js +7 -0
  350. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.js.map +1 -0
  351. package/dist/src/plugins/gateway-forwarder/index.d.ts +4 -0
  352. package/dist/src/plugins/gateway-forwarder/index.d.ts.map +1 -0
  353. package/dist/src/plugins/gateway-forwarder/index.js +4 -0
  354. package/dist/src/plugins/gateway-forwarder/index.js.map +1 -0
  355. package/dist/src/plugins/linked-roles/LinkedRoles.d.ts +70 -0
  356. package/dist/src/plugins/linked-roles/LinkedRoles.d.ts.map +1 -0
  357. package/dist/src/plugins/linked-roles/LinkedRoles.js +211 -0
  358. package/dist/src/plugins/linked-roles/LinkedRoles.js.map +1 -0
  359. package/dist/src/plugins/linked-roles/index.d.ts +3 -0
  360. package/dist/src/plugins/linked-roles/index.d.ts.map +1 -0
  361. package/dist/src/plugins/linked-roles/index.js +3 -0
  362. package/dist/src/plugins/linked-roles/index.js.map +1 -0
  363. package/dist/src/plugins/linked-roles/types.d.ts +94 -0
  364. package/dist/src/plugins/linked-roles/types.d.ts.map +1 -0
  365. package/dist/src/plugins/linked-roles/types.js +39 -0
  366. package/dist/src/plugins/linked-roles/types.js.map +1 -0
  367. package/dist/src/plugins/paginator/GoToPageModal.d.ts +18 -0
  368. package/dist/src/plugins/paginator/GoToPageModal.d.ts.map +1 -0
  369. package/dist/src/plugins/paginator/GoToPageModal.js +56 -0
  370. package/dist/src/plugins/paginator/GoToPageModal.js.map +1 -0
  371. package/dist/src/plugins/paginator/Paginator.d.ts +53 -0
  372. package/dist/src/plugins/paginator/Paginator.d.ts.map +1 -0
  373. package/dist/src/plugins/paginator/Paginator.js +183 -0
  374. package/dist/src/plugins/paginator/Paginator.js.map +1 -0
  375. package/dist/src/plugins/paginator/index.d.ts +11 -0
  376. package/dist/src/plugins/paginator/index.d.ts.map +1 -0
  377. package/dist/src/plugins/paginator/index.js +11 -0
  378. package/dist/src/plugins/paginator/index.js.map +1 -0
  379. package/dist/src/plugins/sharding/ShardingPlugin.d.ts +44 -0
  380. package/dist/src/plugins/sharding/ShardingPlugin.d.ts.map +1 -0
  381. package/dist/src/plugins/sharding/ShardingPlugin.js +119 -0
  382. package/dist/src/plugins/sharding/ShardingPlugin.js.map +1 -0
  383. package/dist/src/plugins/sharding/index.d.ts +3 -0
  384. package/dist/src/plugins/sharding/index.d.ts.map +1 -0
  385. package/dist/src/plugins/sharding/index.js +3 -0
  386. package/dist/src/plugins/sharding/index.js.map +1 -0
  387. package/dist/src/plugins/voice/GuildDeleteListener.d.ts +7 -0
  388. package/dist/src/plugins/voice/GuildDeleteListener.d.ts.map +1 -0
  389. package/dist/src/plugins/voice/GuildDeleteListener.js +11 -0
  390. package/dist/src/plugins/voice/GuildDeleteListener.js.map +1 -0
  391. package/dist/src/plugins/voice/VoicePlugin.d.ts +15 -0
  392. package/dist/src/plugins/voice/VoicePlugin.d.ts.map +1 -0
  393. package/dist/src/plugins/voice/VoicePlugin.js +58 -0
  394. package/dist/src/plugins/voice/VoicePlugin.js.map +1 -0
  395. package/dist/src/plugins/voice/VoiceServerUpdateListener.d.ts +10 -0
  396. package/dist/src/plugins/voice/VoiceServerUpdateListener.d.ts.map +1 -0
  397. package/dist/src/plugins/voice/VoiceServerUpdateListener.js +16 -0
  398. package/dist/src/plugins/voice/VoiceServerUpdateListener.js.map +1 -0
  399. package/dist/src/plugins/voice/VoiceStateUpdateListener.d.ts +10 -0
  400. package/dist/src/plugins/voice/VoiceStateUpdateListener.d.ts.map +1 -0
  401. package/dist/src/plugins/voice/VoiceStateUpdateListener.js +21 -0
  402. package/dist/src/plugins/voice/VoiceStateUpdateListener.js.map +1 -0
  403. package/dist/src/plugins/voice/index.d.ts +2 -0
  404. package/dist/src/plugins/voice/index.d.ts.map +1 -0
  405. package/dist/src/plugins/voice/index.js +2 -0
  406. package/dist/src/plugins/voice/index.js.map +1 -0
  407. package/dist/src/structures/DmChannel.d.ts +22 -0
  408. package/dist/src/structures/DmChannel.d.ts.map +1 -0
  409. package/dist/src/structures/DmChannel.js +33 -0
  410. package/dist/src/structures/DmChannel.js.map +1 -0
  411. package/dist/src/structures/Emoji.d.ts +75 -0
  412. package/dist/src/structures/Emoji.d.ts.map +1 -0
  413. package/dist/src/structures/Emoji.js +156 -0
  414. package/dist/src/structures/Emoji.js.map +1 -0
  415. package/dist/src/structures/GroupDmChannel.d.ts +75 -0
  416. package/dist/src/structures/GroupDmChannel.d.ts.map +1 -0
  417. package/dist/src/structures/GroupDmChannel.js +131 -0
  418. package/dist/src/structures/GroupDmChannel.js.map +1 -0
  419. package/dist/src/structures/Guild.d.ts +338 -0
  420. package/dist/src/structures/Guild.d.ts.map +1 -0
  421. package/dist/src/structures/Guild.js +715 -0
  422. package/dist/src/structures/Guild.js.map +1 -0
  423. package/dist/src/structures/GuildAnnouncementChannel.d.ts +21 -0
  424. package/dist/src/structures/GuildAnnouncementChannel.d.ts.map +1 -0
  425. package/dist/src/structures/GuildAnnouncementChannel.js +35 -0
  426. package/dist/src/structures/GuildAnnouncementChannel.js.map +1 -0
  427. package/dist/src/structures/GuildCategoryChannel.d.ts +23 -0
  428. package/dist/src/structures/GuildCategoryChannel.d.ts.map +1 -0
  429. package/dist/src/structures/GuildCategoryChannel.js +34 -0
  430. package/dist/src/structures/GuildCategoryChannel.js.map +1 -0
  431. package/dist/src/structures/GuildForumChannel.d.ts +14 -0
  432. package/dist/src/structures/GuildForumChannel.d.ts.map +1 -0
  433. package/dist/src/structures/GuildForumChannel.js +15 -0
  434. package/dist/src/structures/GuildForumChannel.js.map +1 -0
  435. package/dist/src/structures/GuildMediaChannel.d.ts +9 -0
  436. package/dist/src/structures/GuildMediaChannel.d.ts.map +1 -0
  437. package/dist/src/structures/GuildMediaChannel.js +7 -0
  438. package/dist/src/structures/GuildMediaChannel.js.map +1 -0
  439. package/dist/src/structures/GuildMember.d.ts +145 -0
  440. package/dist/src/structures/GuildMember.d.ts.map +1 -0
  441. package/dist/src/structures/GuildMember.js +320 -0
  442. package/dist/src/structures/GuildMember.js.map +1 -0
  443. package/dist/src/structures/GuildScheduledEvent.d.ts +121 -0
  444. package/dist/src/structures/GuildScheduledEvent.d.ts.map +1 -0
  445. package/dist/src/structures/GuildScheduledEvent.js +228 -0
  446. package/dist/src/structures/GuildScheduledEvent.js.map +1 -0
  447. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts +40 -0
  448. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts.map +1 -0
  449. package/dist/src/structures/GuildStageOrVoiceChannel.js +63 -0
  450. package/dist/src/structures/GuildStageOrVoiceChannel.js.map +1 -0
  451. package/dist/src/structures/GuildTextChannel.d.ts +24 -0
  452. package/dist/src/structures/GuildTextChannel.d.ts.map +1 -0
  453. package/dist/src/structures/GuildTextChannel.js +41 -0
  454. package/dist/src/structures/GuildTextChannel.js.map +1 -0
  455. package/dist/src/structures/GuildThreadChannel.d.ts +90 -0
  456. package/dist/src/structures/GuildThreadChannel.d.ts.map +1 -0
  457. package/dist/src/structures/GuildThreadChannel.js +165 -0
  458. package/dist/src/structures/GuildThreadChannel.js.map +1 -0
  459. package/dist/src/structures/Message.d.ts +174 -0
  460. package/dist/src/structures/Message.d.ts.map +1 -0
  461. package/dist/src/structures/Message.js +417 -0
  462. package/dist/src/structures/Message.js.map +1 -0
  463. package/dist/src/structures/Poll.d.ts +29 -0
  464. package/dist/src/structures/Poll.d.ts.map +1 -0
  465. package/dist/src/structures/Poll.js +51 -0
  466. package/dist/src/structures/Poll.js.map +1 -0
  467. package/dist/src/structures/Role.d.ts +151 -0
  468. package/dist/src/structures/Role.d.ts.map +1 -0
  469. package/dist/src/structures/Role.js +291 -0
  470. package/dist/src/structures/Role.js.map +1 -0
  471. package/dist/src/structures/ThreadMember.d.ts +40 -0
  472. package/dist/src/structures/ThreadMember.d.ts.map +1 -0
  473. package/dist/src/structures/ThreadMember.js +79 -0
  474. package/dist/src/structures/ThreadMember.js.map +1 -0
  475. package/dist/src/structures/User.d.ts +104 -0
  476. package/dist/src/structures/User.d.ts.map +1 -0
  477. package/dist/src/structures/User.js +199 -0
  478. package/dist/src/structures/User.js.map +1 -0
  479. package/dist/src/structures/Webhook.d.ts +160 -0
  480. package/dist/src/structures/Webhook.d.ts.map +1 -0
  481. package/dist/src/structures/Webhook.js +287 -0
  482. package/dist/src/structures/Webhook.js.map +1 -0
  483. package/dist/src/types/index.d.ts +199 -0
  484. package/dist/src/types/index.d.ts.map +1 -0
  485. package/dist/src/types/index.js +2 -0
  486. package/dist/src/types/index.js.map +1 -0
  487. package/dist/src/types/listeners.d.ts +579 -0
  488. package/dist/src/types/listeners.d.ts.map +1 -0
  489. package/dist/src/types/listeners.js +14 -0
  490. package/dist/src/types/listeners.js.map +1 -0
  491. package/dist/src/utils/LRUCache.d.ts +46 -0
  492. package/dist/src/utils/LRUCache.d.ts.map +1 -0
  493. package/dist/src/utils/LRUCache.js +78 -0
  494. package/dist/src/utils/LRUCache.js.map +1 -0
  495. package/dist/src/utils/cdn.d.ts +31 -0
  496. package/dist/src/utils/cdn.d.ts.map +1 -0
  497. package/dist/src/utils/cdn.js +18 -0
  498. package/dist/src/utils/cdn.js.map +1 -0
  499. package/dist/src/utils/customIdParser.d.ts +3 -0
  500. package/dist/src/utils/customIdParser.d.ts.map +1 -0
  501. package/dist/src/utils/customIdParser.js +38 -0
  502. package/dist/src/utils/customIdParser.js.map +1 -0
  503. package/dist/src/utils/index.d.ts +6 -0
  504. package/dist/src/utils/index.d.ts.map +1 -0
  505. package/dist/src/utils/index.js +6 -0
  506. package/dist/src/utils/index.js.map +1 -0
  507. package/dist/src/utils/payload.d.ts +4 -0
  508. package/dist/src/utils/payload.d.ts.map +1 -0
  509. package/dist/src/utils/payload.js +61 -0
  510. package/dist/src/utils/payload.js.map +1 -0
  511. package/dist/src/utils/proxy.d.ts +27 -0
  512. package/dist/src/utils/proxy.d.ts.map +1 -0
  513. package/dist/src/utils/proxy.js +135 -0
  514. package/dist/src/utils/proxy.js.map +1 -0
  515. package/dist/src/utils/verification.d.ts +4 -0
  516. package/dist/src/utils/verification.d.ts.map +1 -0
  517. package/dist/src/utils/verification.js +52 -0
  518. package/dist/src/utils/verification.js.map +1 -0
  519. package/dist/tsconfig.tsbuildinfo +1 -0
  520. package/package.json +43 -0
@@ -0,0 +1,28 @@
1
+ import { type APIActionRowComponent, type APIComponentInMessageActionRow, ComponentType } from "discord-api-types/v10";
2
+ import { BaseComponent } from "../../abstracts/BaseComponent.js";
3
+ import type { BaseMessageInteractiveComponent } from "../../abstracts/BaseMessageInteractiveComponent.js";
4
+ export declare class Row<T extends BaseMessageInteractiveComponent> extends BaseComponent {
5
+ readonly type: ComponentType.ActionRow;
6
+ readonly isV2 = false;
7
+ /**
8
+ * The components in the action row
9
+ */
10
+ components: T[];
11
+ constructor(components?: T[]);
12
+ /**
13
+ * Add a component to the action row
14
+ * @param component The component to add
15
+ */
16
+ addComponent(component: T): void;
17
+ /**
18
+ * Remove a component from the action row
19
+ * @param component The component to remove
20
+ */
21
+ removeComponent(component: T): void;
22
+ /**
23
+ * Remove all components from the action row
24
+ */
25
+ removeAllComponents(): void;
26
+ serialize: () => APIActionRowComponent<APIComponentInMessageActionRow>;
27
+ }
28
+ //# 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,EACN,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAA;AAEzG,qBAAa,GAAG,CACf,CAAC,SAAS,+BAA+B,CACxC,SAAQ,aAAa;IACtB,QAAQ,CAAC,IAAI,0BAAmC;IAChD,QAAQ,CAAC,IAAI,SAAQ;IAErB;;OAEG;IACH,UAAU,EAAE,CAAC,EAAE,CAAK;gBAER,UAAU,GAAE,CAAC,EAAO;IAKhC;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,CAAC;IAIzB;;;OAGG;IACH,eAAe,CAAC,SAAS,EAAE,CAAC;IAM5B;;OAEG;IACH,mBAAmB;IAInB,SAAS,QAAO,qBAAqB,CAAC,8BAA8B,CAAC,CAKpE;CACD"}
@@ -0,0 +1,44 @@
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;
6
+ /**
7
+ * The components in the action row
8
+ */
9
+ components = [];
10
+ constructor(components = []) {
11
+ super();
12
+ this.components = components;
13
+ }
14
+ /**
15
+ * Add a component to the action row
16
+ * @param component The component to add
17
+ */
18
+ addComponent(component) {
19
+ this.components.push(component);
20
+ }
21
+ /**
22
+ * Remove a component from the action row
23
+ * @param component The component to remove
24
+ */
25
+ removeComponent(component) {
26
+ const index = this.components.indexOf(component);
27
+ if (index === -1)
28
+ return;
29
+ this.components.splice(index, 1);
30
+ }
31
+ /**
32
+ * Remove all components from the action row
33
+ */
34
+ removeAllComponents() {
35
+ this.components = [];
36
+ }
37
+ serialize = () => {
38
+ return {
39
+ type: ComponentType.ActionRow,
40
+ components: this.components.map((component) => component.serialize())
41
+ };
42
+ };
43
+ }
44
+ //# sourceMappingURL=Row.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Row.js","sourceRoot":"","sources":["../../../../src/classes/components/Row.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAGhE,MAAM,OAAO,GAEX,SAAQ,aAAa;IACb,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,KAAK,CAAA;IAErB;;OAEG;IACH,UAAU,GAAQ,EAAE,CAAA;IAEpB,YAAY,aAAkB,EAAE;QAC/B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC7B,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,GAA0D,EAAE;QACvE,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;SACrE,CAAA;IACF,CAAC,CAAA;CACD"}
@@ -0,0 +1,23 @@
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 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
+ 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
+ accessory: Thumbnail | Button | LinkButton | undefined;
20
+ constructor(components?: TextDisplay[], accessory?: Thumbnail | Button | LinkButton);
21
+ serialize: () => APISectionComponent;
22
+ }
23
+ //# 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,qBAAa,OAAQ,SAAQ,aAAa;IACzC,QAAQ,CAAC,IAAI,wBAAiC;IAC9C,QAAQ,CAAC,IAAI,QAAO;IAEpB;;;OAGG;IACH,UAAU,EAAE,WAAW,EAAE,CAAK;IAE9B;;;;OAIG;IACH,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAA;gBAGrD,UAAU,GAAE,WAAW,EAAO,EAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU;IAO5C,SAAS,QAAO,mBAAmB,CAelC;CACD"}
@@ -0,0 +1,37 @@
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
+ /**
7
+ * This is the main text that will be displayed in the section.
8
+ * You can have 1-3 TextDisplays in a Section
9
+ */
10
+ components = [];
11
+ /**
12
+ * The Thumbnail or Button that will be displayed to the right of the main text.
13
+ * You can only have 1 Thumbnail or Button in a Section.
14
+ * If you don't want an accessory, you should be just using the TextDisplay directly.
15
+ */
16
+ accessory;
17
+ constructor(components = [], accessory) {
18
+ super();
19
+ this.components = components;
20
+ this.accessory = accessory;
21
+ }
22
+ serialize = () => {
23
+ if (!this.components || this.components.length === 0) {
24
+ throw new Error("Sections must contain at least one TextDisplay component");
25
+ }
26
+ if (!this.accessory) {
27
+ throw new Error("Sections must have an accessory component");
28
+ }
29
+ return {
30
+ type: this.type,
31
+ id: this.id,
32
+ components: this.components.map((component) => component.serialize()),
33
+ accessory: this.accessory.serialize()
34
+ };
35
+ };
36
+ }
37
+ //# 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,OAAO,OAAQ,SAAQ,aAAa;IAChC,IAAI,GAAG,aAAa,CAAC,OAAgB,CAAA;IACrC,IAAI,GAAG,IAAI,CAAA;IAEpB;;;OAGG;IACH,UAAU,GAAkB,EAAE,CAAA;IAE9B;;;;OAIG;IACH,SAAS,CAA6C;IAEtD,YACC,aAA4B,EAAE,EAC9B,SAA2C;QAE3C,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC3B,CAAC;IAED,SAAS,GAAG,GAAwB,EAAE;QACrC,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtD,MAAM,IAAI,KAAK,CACd,0DAA0D,CAC1D,CAAA;QACF,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;QAC7D,CAAC;QACD,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,CAAC,EAAE,MAAM,CAAA;gBAEJ,OAAO,CAAC,EAAE,MAAM;IAK5B,SAAS,QAAO,uBAAuB,CAStC;CACD"}
@@ -0,0 +1,22 @@
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
+ if (!this.content) {
13
+ throw new Error("TextDisplay must have content");
14
+ }
15
+ return {
16
+ type: this.type,
17
+ id: this.id,
18
+ content: this.content
19
+ };
20
+ };
21
+ }
22
+ //# 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,CAAS;IAEhB,YAAY,OAAgB;QAC3B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACvB,CAAC;IAED,SAAS,GAAG,GAA4B,EAAE;QACzC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;QACjD,CAAC;QACD,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"}
@@ -0,0 +1,53 @@
1
+ import { type APITextInputComponent, ComponentType, TextInputStyle } from "discord-api-types/v10";
2
+ import { BaseModalComponent } from "../../abstracts/BaseModalComponent.js";
3
+ import type { ComponentParserResult } from "../../types/index.js";
4
+ export declare abstract class TextInput extends BaseModalComponent {
5
+ readonly type: ComponentType.TextInput;
6
+ /**
7
+ * The custom ID of the component.
8
+ * If you want to provide a custom ID with additional data, you should either follow the default parser's format or implement your own custom parser.
9
+ *
10
+ * @see {@link customIdParser}
11
+ */
12
+ abstract customId: string;
13
+ /**
14
+ * This function is called by the handler when a component is received, and is used to parse the custom ID into a key and data object.
15
+ * By default, the ID is parsed in this format: `key:arg1=true;arg2=2;arg3=cheese`, where `arg1`, `arg2`, and `arg3` are the data arguments.
16
+ * It will also automatically parse `true` and `false` as booleans, and will parse numbers as numbers.
17
+ *
18
+ * You can override this to parse the ID in a different format as you see fit, but it must follow these rules:
19
+ * - The ID must have a `key` somewhere in the ID that can be returned by the parser. This key is what Carbon's component handler will use to identify the component and pass an interaction to the correct component.
20
+ * - The data must be able to be arbitrary as far as Carbon's handler is concerned, meaning that any component with the same base key can be treated as the same component with logic within the component's logic methods to handle the data.
21
+ *
22
+ * @param id - The custom ID of the component as received from an interaction event
23
+ * @returns The base key and the data object
24
+ */
25
+ customIdParser: (id: string) => ComponentParserResult;
26
+ /**
27
+ * The style of the text input
28
+ * @default TextInputStyle.Short
29
+ */
30
+ style: TextInputStyle;
31
+ /**
32
+ * The minimum length of the text input
33
+ */
34
+ minLength?: number;
35
+ /**
36
+ * The maximum length of the text input
37
+ */
38
+ maxLength?: number;
39
+ /**
40
+ * Whether the text input is required
41
+ */
42
+ required?: boolean;
43
+ /**
44
+ * The value of the text input
45
+ */
46
+ value?: string;
47
+ /**
48
+ * The placeholder of the text input
49
+ */
50
+ placeholder?: string;
51
+ serialize: () => APITextInputComponent;
52
+ }
53
+ //# sourceMappingURL=TextInput.d.ts.map
@@ -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;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAGjE,8BAAsB,SAAU,SAAQ,kBAAkB;IACzD,QAAQ,CAAC,IAAI,0BAAmC;IAEhD;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAEzB;;;;;;;;;;;OAWG;IACH,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,qBAAqB,CAAgB;IAErE;;;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,CAWpC;CACD"}
@@ -0,0 +1,57 @@
1
+ import { ComponentType, TextInputStyle } from "discord-api-types/v10";
2
+ import { BaseModalComponent } from "../../abstracts/BaseModalComponent.js";
3
+ import { parseCustomId } from "../../utils/customIdParser.js";
4
+ export class TextInput extends BaseModalComponent {
5
+ type = ComponentType.TextInput;
6
+ /**
7
+ * This function is called by the handler when a component is received, and is used to parse the custom ID into a key and data object.
8
+ * By default, the ID is parsed in this format: `key:arg1=true;arg2=2;arg3=cheese`, where `arg1`, `arg2`, and `arg3` are the data arguments.
9
+ * It will also automatically parse `true` and `false` as booleans, and will parse numbers as numbers.
10
+ *
11
+ * You can override this to parse the ID in a different format as you see fit, but it must follow these rules:
12
+ * - The ID must have a `key` somewhere in the ID that can be returned by the parser. This key is what Carbon's component handler will use to identify the component and pass an interaction to the correct component.
13
+ * - The data must be able to be arbitrary as far as Carbon's handler is concerned, meaning that any component with the same base key can be treated as the same component with logic within the component's logic methods to handle the data.
14
+ *
15
+ * @param id - The custom ID of the component as received from an interaction event
16
+ * @returns The base key and the data object
17
+ */
18
+ customIdParser = parseCustomId;
19
+ /**
20
+ * The style of the text input
21
+ * @default TextInputStyle.Short
22
+ */
23
+ style = TextInputStyle.Short;
24
+ /**
25
+ * The minimum length of the text input
26
+ */
27
+ minLength;
28
+ /**
29
+ * The maximum length of the text input
30
+ */
31
+ maxLength;
32
+ /**
33
+ * Whether the text input is required
34
+ */
35
+ required;
36
+ /**
37
+ * The value of the text input
38
+ */
39
+ value;
40
+ /**
41
+ * The placeholder of the text input
42
+ */
43
+ placeholder;
44
+ serialize = () => {
45
+ return {
46
+ type: ComponentType.TextInput,
47
+ custom_id: this.customId,
48
+ style: this.style,
49
+ min_length: this.minLength,
50
+ max_length: this.maxLength,
51
+ required: this.required,
52
+ value: this.value,
53
+ placeholder: this.placeholder
54
+ };
55
+ };
56
+ }
57
+ //# sourceMappingURL=TextInput.js.map
@@ -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,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAE7D,MAAM,OAAgB,SAAU,SAAQ,kBAAkB;IAChD,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IAUhD;;;;;;;;;;;OAWG;IACH,cAAc,GAA0C,aAAa,CAAA;IAErE;;;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,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,14 @@
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 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
+ url?: string;
11
+ constructor(url?: string);
12
+ serialize: () => APIThumbnailComponent;
13
+ }
14
+ //# 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,qBAAa,SAAU,SAAQ,aAAa;IAC3C,QAAQ,CAAC,IAAI,0BAAmC;IAChD,QAAQ,CAAC,IAAI,QAAO;IAEpB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;gBAEA,GAAG,CAAC,EAAE,MAAM;IAKxB,SAAS,QAAO,qBAAqB,CASpC;CACD"}
@@ -0,0 +1,27 @@
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
+ /**
7
+ * The URL of the thumbnail. This can either be a direct online URL or an attachment://<name> reference
8
+ */
9
+ url;
10
+ constructor(url) {
11
+ super();
12
+ if (url)
13
+ this.url = url;
14
+ }
15
+ serialize = () => {
16
+ if (!this.url)
17
+ throw new Error("Thumbnail must have a URL");
18
+ return {
19
+ type: this.type,
20
+ id: this.id,
21
+ media: {
22
+ url: this.url
23
+ }
24
+ };
25
+ };
26
+ }
27
+ //# 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,OAAO,SAAU,SAAQ,aAAa;IAClC,IAAI,GAAG,aAAa,CAAC,SAAkB,CAAA;IACvC,IAAI,GAAG,IAAI,CAAA;IAEpB;;OAEG;IACH,GAAG,CAAS;IAEZ,YAAY,GAAY;QACvB,KAAK,EAAE,CAAA;QACP,IAAI,GAAG;YAAE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IACxB,CAAC;IAED,SAAS,GAAG,GAA0B,EAAE;QACvC,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;QAC3D,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"}
@@ -0,0 +1,15 @@
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";
4
+ import type { ComponentData } from "../../types/index.js";
5
+ export declare abstract class UserSelectMenu extends AnySelectMenu {
6
+ readonly type: ComponentType.UserSelect;
7
+ readonly isV2 = false;
8
+ defaultValues?: APIUserSelectComponent["default_values"];
9
+ run(interaction: UserSelectMenuInteraction, data: ComponentData): unknown | Promise<unknown>;
10
+ serializeOptions(): {
11
+ type: ComponentType.UserSelect;
12
+ default_values: import("discord-api-types/v10").APISelectMenuDefaultValue<import("discord-api-types/v10").SelectMenuDefaultValueType.User>[] | undefined;
13
+ };
14
+ }
15
+ //# sourceMappingURL=UserSelectMenu.d.ts.map
@@ -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"}
@@ -0,0 +1,20 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { AnySelectMenu } from "../../abstracts/AnySelectMenu.js";
3
+ export class UserSelectMenu extends AnySelectMenu {
4
+ type = ComponentType.UserSelect;
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=UserSelectMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserSelectMenu.js","sourceRoot":"","sources":["../../../../src/classes/components/UserSelectMenu.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,3 @@
1
+ export declare class BaseError extends Error {
2
+ }
3
+ //# sourceMappingURL=BaseError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseError.d.ts","sourceRoot":"","sources":["../../../src/errors/BaseError.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAU,SAAQ,KAAK;CAAG"}
@@ -0,0 +1,3 @@
1
+ export class BaseError extends Error {
2
+ }
3
+ //# sourceMappingURL=BaseError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseError.js","sourceRoot":"","sources":["../../../src/errors/BaseError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;CAAG"}
@@ -0,0 +1,25 @@
1
+ import { type DiscordRawError, type TransformedError } from "../functions/errorsMapper.js";
2
+ import { BaseError } from "./BaseError.js";
3
+ export declare class DiscordError extends BaseError {
4
+ /**
5
+ * The HTTP status code of the response from Discord
6
+ * @see https://discord.com/developers/docs/topics/opcodes-and-status-codes#http
7
+ */
8
+ status: number;
9
+ /**
10
+ * The Discord error code
11
+ * @see https://discord.com/developers/docs/topics/opcodes-and-status-codes#json
12
+ */
13
+ discordCode?: number;
14
+ /**
15
+ * An array of the errors that were returned by Discord
16
+ */
17
+ errors: TransformedError[];
18
+ /**
19
+ * The raw body of the error from Discord
20
+ * @internal
21
+ */
22
+ rawBody: DiscordRawError;
23
+ constructor(response: Response, body: DiscordRawError);
24
+ }
25
+ //# sourceMappingURL=DiscordError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiscordError.d.ts","sourceRoot":"","sources":["../../../src/errors/DiscordError.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,eAAe,EAEpB,KAAK,gBAAgB,EACrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,qBAAa,YAAa,SAAQ,SAAS;IAC1C;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,MAAM,EAAE,gBAAgB,EAAE,CAAA;IAE1B;;;OAGG;IACH,OAAO,EAAE,eAAe,CAAA;gBAEZ,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe;CAOrD"}
@@ -0,0 +1,31 @@
1
+ import { errorMapper } from "../functions/errorsMapper.js";
2
+ import { BaseError } from "./BaseError.js";
3
+ export class DiscordError extends BaseError {
4
+ /**
5
+ * The HTTP status code of the response from Discord
6
+ * @see https://discord.com/developers/docs/topics/opcodes-and-status-codes#http
7
+ */
8
+ status;
9
+ /**
10
+ * The Discord error code
11
+ * @see https://discord.com/developers/docs/topics/opcodes-and-status-codes#json
12
+ */
13
+ discordCode;
14
+ /**
15
+ * An array of the errors that were returned by Discord
16
+ */
17
+ errors;
18
+ /**
19
+ * The raw body of the error from Discord
20
+ * @internal
21
+ */
22
+ rawBody;
23
+ constructor(response, body) {
24
+ super(body.message);
25
+ this.rawBody = body;
26
+ this.status = response.status;
27
+ this.discordCode = body.code;
28
+ this.errors = errorMapper(body);
29
+ }
30
+ }
31
+ //# sourceMappingURL=DiscordError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiscordError.js","sourceRoot":"","sources":["../../../src/errors/DiscordError.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,WAAW,EAEX,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,OAAO,YAAa,SAAQ,SAAS;IAC1C;;;OAGG;IACH,MAAM,CAAQ;IACd;;;OAGG;IACH,WAAW,CAAS;IACpB;;OAEG;IACH,MAAM,CAAoB;IAE1B;;;OAGG;IACH,OAAO,CAAiB;IAExB,YAAY,QAAkB,EAAE,IAAqB;QACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACnB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;QACnB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAA;QAC7B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACD"}
@@ -0,0 +1,15 @@
1
+ import { DiscordError } from "./DiscordError.js";
2
+ /**
3
+ * A RateLimitError is thrown when the bot is rate limited by Discord, and you don't have requests set to queue.
4
+ */
5
+ export declare class RateLimitError extends DiscordError {
6
+ retryAfter: number;
7
+ scope: "global" | "shared" | "user";
8
+ bucket: string | null;
9
+ constructor(response: Response, body: {
10
+ message: string;
11
+ retry_after: number;
12
+ global: boolean;
13
+ });
14
+ }
15
+ //# sourceMappingURL=RatelimitError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RatelimitError.d.ts","sourceRoot":"","sources":["../../../src/errors/RatelimitError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC/C,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAA;IACnC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;gBAGpB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE;QACL,OAAO,EAAE,MAAM,CAAA;QACf,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,OAAO,CAAA;KACf;CAYF"}