@buape/carbon 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/.turbo/turbo-build.log +5 -0
  2. package/.turbo/turbo-dev.log +12 -0
  3. package/.turbo/turbo-docs.log +10 -0
  4. package/CHANGELOG.md +14 -0
  5. package/LICENSE +21 -0
  6. package/README.md +45 -0
  7. package/dist/package.json +18 -0
  8. package/dist/src/abstracts/AnySelectMenu.d.ts +31 -0
  9. package/dist/src/abstracts/AnySelectMenu.d.ts.map +1 -0
  10. package/dist/src/abstracts/AnySelectMenu.js +19 -0
  11. package/dist/src/abstracts/AnySelectMenu.js.map +1 -0
  12. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts +12 -0
  13. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts.map +1 -0
  14. package/dist/src/abstracts/AnySelectMenuInteraction.js +21 -0
  15. package/dist/src/abstracts/AnySelectMenuInteraction.js.map +1 -0
  16. package/dist/src/abstracts/Base.d.ts +10 -0
  17. package/dist/src/abstracts/Base.d.ts.map +1 -0
  18. package/dist/src/abstracts/Base.js +11 -0
  19. package/dist/src/abstracts/Base.js.map +1 -0
  20. package/dist/src/abstracts/BaseChannel.d.ts +44 -0
  21. package/dist/src/abstracts/BaseChannel.d.ts.map +1 -0
  22. package/dist/src/abstracts/BaseChannel.js +58 -0
  23. package/dist/src/abstracts/BaseChannel.js.map +1 -0
  24. package/dist/src/abstracts/BaseCommand.d.ts +58 -0
  25. package/dist/src/abstracts/BaseCommand.d.ts.map +1 -0
  26. package/dist/src/abstracts/BaseCommand.js +69 -0
  27. package/dist/src/abstracts/BaseCommand.js.map +1 -0
  28. package/dist/src/abstracts/BaseComponent.d.ts +34 -0
  29. package/dist/src/abstracts/BaseComponent.d.ts.map +1 -0
  30. package/dist/src/abstracts/BaseComponent.js +30 -0
  31. package/dist/src/abstracts/BaseComponent.js.map +1 -0
  32. package/dist/src/abstracts/BaseComponentInteraction.d.ts +9 -0
  33. package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -0
  34. package/dist/src/abstracts/BaseComponentInteraction.js +14 -0
  35. package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -0
  36. package/dist/src/abstracts/BaseGuildChannel.d.ts +68 -0
  37. package/dist/src/abstracts/BaseGuildChannel.d.ts.map +1 -0
  38. package/dist/src/abstracts/BaseGuildChannel.js +130 -0
  39. package/dist/src/abstracts/BaseGuildChannel.js.map +1 -0
  40. package/dist/src/abstracts/BaseGuildTextChannel.d.ts +42 -0
  41. package/dist/src/abstracts/BaseGuildTextChannel.d.ts.map +1 -0
  42. package/dist/src/abstracts/BaseGuildTextChannel.js +61 -0
  43. package/dist/src/abstracts/BaseGuildTextChannel.js.map +1 -0
  44. package/dist/src/abstracts/BaseInteraction.d.ts +87 -0
  45. package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -0
  46. package/dist/src/abstracts/BaseInteraction.js +101 -0
  47. package/dist/src/abstracts/BaseInteraction.js.map +1 -0
  48. package/dist/src/abstracts/ButtonInteraction.d.ts +8 -0
  49. package/dist/src/abstracts/ButtonInteraction.d.ts.map +1 -0
  50. package/dist/src/abstracts/ButtonInteraction.js +18 -0
  51. package/dist/src/abstracts/ButtonInteraction.js.map +1 -0
  52. package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts +7 -0
  53. package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts.map +1 -0
  54. package/dist/src/abstracts/ChannelSelectMenuInteraction.js +11 -0
  55. package/dist/src/abstracts/ChannelSelectMenuInteraction.js.map +1 -0
  56. package/dist/src/abstracts/CommandHandler.d.ts +6 -0
  57. package/dist/src/abstracts/CommandHandler.d.ts.map +1 -0
  58. package/dist/src/abstracts/CommandHandler.js +65 -0
  59. package/dist/src/abstracts/CommandHandler.js.map +1 -0
  60. package/dist/src/abstracts/CommandInteraction.d.ts +15 -0
  61. package/dist/src/abstracts/CommandInteraction.d.ts.map +1 -0
  62. package/dist/src/abstracts/CommandInteraction.js +60 -0
  63. package/dist/src/abstracts/CommandInteraction.js.map +1 -0
  64. package/dist/src/abstracts/ComponentHandler.d.ts +6 -0
  65. package/dist/src/abstracts/ComponentHandler.d.ts.map +1 -0
  66. package/dist/src/abstracts/ComponentHandler.js +64 -0
  67. package/dist/src/abstracts/ComponentHandler.js.map +1 -0
  68. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts +42 -0
  69. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts.map +1 -0
  70. package/dist/src/abstracts/GuildThreadOnlyChannel.js +54 -0
  71. package/dist/src/abstracts/GuildThreadOnlyChannel.js.map +1 -0
  72. package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts +8 -0
  73. package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts.map +1 -0
  74. package/dist/src/abstracts/MentionableSelectMenuInteraction.js +15 -0
  75. package/dist/src/abstracts/MentionableSelectMenuInteraction.js.map +1 -0
  76. package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts +8 -0
  77. package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts.map +1 -0
  78. package/dist/src/abstracts/RoleSelectMenuInteraction.js +14 -0
  79. package/dist/src/abstracts/RoleSelectMenuInteraction.js.map +1 -0
  80. package/dist/src/abstracts/StringSelectMenuInteraction.d.ts +8 -0
  81. package/dist/src/abstracts/StringSelectMenuInteraction.d.ts.map +1 -0
  82. package/dist/src/abstracts/StringSelectMenuInteraction.js +14 -0
  83. package/dist/src/abstracts/StringSelectMenuInteraction.js.map +1 -0
  84. package/dist/src/abstracts/UserSelectMenuInteraction.d.ts +8 -0
  85. package/dist/src/abstracts/UserSelectMenuInteraction.d.ts.map +1 -0
  86. package/dist/src/abstracts/UserSelectMenuInteraction.js +14 -0
  87. package/dist/src/abstracts/UserSelectMenuInteraction.js.map +1 -0
  88. package/dist/src/classes/Button.d.ts +53 -0
  89. package/dist/src/classes/Button.d.ts.map +1 -0
  90. package/dist/src/classes/Button.js +55 -0
  91. package/dist/src/classes/Button.js.map +1 -0
  92. package/dist/src/classes/ChannelSelectMenu.d.ts +15 -0
  93. package/dist/src/classes/ChannelSelectMenu.d.ts.map +1 -0
  94. package/dist/src/classes/ChannelSelectMenu.js +15 -0
  95. package/dist/src/classes/ChannelSelectMenu.js.map +1 -0
  96. package/dist/src/classes/Client.d.ts +117 -0
  97. package/dist/src/classes/Client.d.ts.map +1 -0
  98. package/dist/src/classes/Client.js +170 -0
  99. package/dist/src/classes/Client.js.map +1 -0
  100. package/dist/src/classes/Command.d.ts +35 -0
  101. package/dist/src/classes/Command.d.ts.map +1 -0
  102. package/dist/src/classes/Command.js +31 -0
  103. package/dist/src/classes/Command.js.map +1 -0
  104. package/dist/src/classes/CommandWithSubcommandGroups.d.ts +22 -0
  105. package/dist/src/classes/CommandWithSubcommandGroups.d.ts.map +1 -0
  106. package/dist/src/classes/CommandWithSubcommandGroups.js +31 -0
  107. package/dist/src/classes/CommandWithSubcommandGroups.js.map +1 -0
  108. package/dist/src/classes/CommandWithSubcommands.d.ts +19 -0
  109. package/dist/src/classes/CommandWithSubcommands.d.ts.map +1 -0
  110. package/dist/src/classes/CommandWithSubcommands.js +21 -0
  111. package/dist/src/classes/CommandWithSubcommands.js.map +1 -0
  112. package/dist/src/classes/MentionableSelectMenu.d.ts +13 -0
  113. package/dist/src/classes/MentionableSelectMenu.d.ts.map +1 -0
  114. package/dist/src/classes/MentionableSelectMenu.js +13 -0
  115. package/dist/src/classes/MentionableSelectMenu.js.map +1 -0
  116. package/dist/src/classes/Paginator.d.ts +3 -0
  117. package/dist/src/classes/Paginator.d.ts.map +1 -0
  118. package/dist/src/classes/Paginator.js +3 -0
  119. package/dist/src/classes/Paginator.js.map +1 -0
  120. package/dist/src/classes/RoleSelectMenu.d.ts +13 -0
  121. package/dist/src/classes/RoleSelectMenu.d.ts.map +1 -0
  122. package/dist/src/classes/RoleSelectMenu.js +13 -0
  123. package/dist/src/classes/RoleSelectMenu.js.map +1 -0
  124. package/dist/src/classes/Row.d.ts +27 -0
  125. package/dist/src/classes/Row.d.ts.map +1 -0
  126. package/dist/src/classes/Row.js +39 -0
  127. package/dist/src/classes/Row.js.map +1 -0
  128. package/dist/src/classes/StringSelectMenu.d.ts +13 -0
  129. package/dist/src/classes/StringSelectMenu.d.ts.map +1 -0
  130. package/dist/src/classes/StringSelectMenu.js +12 -0
  131. package/dist/src/classes/StringSelectMenu.js.map +1 -0
  132. package/dist/src/classes/UserSelectMenu.d.ts +13 -0
  133. package/dist/src/classes/UserSelectMenu.d.ts.map +1 -0
  134. package/dist/src/classes/UserSelectMenu.js +13 -0
  135. package/dist/src/classes/UserSelectMenu.js.map +1 -0
  136. package/dist/src/factories/channelFactory.d.ts +13 -0
  137. package/dist/src/factories/channelFactory.d.ts.map +1 -0
  138. package/dist/src/factories/channelFactory.js +39 -0
  139. package/dist/src/factories/channelFactory.js.map +1 -0
  140. package/dist/src/index.d.ts +49 -0
  141. package/dist/src/index.d.ts.map +1 -0
  142. package/dist/src/index.js +55 -0
  143. package/dist/src/index.js.map +1 -0
  144. package/dist/src/internals/AutocompleteInteraction.d.ts +34 -0
  145. package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -0
  146. package/dist/src/internals/AutocompleteInteraction.js +68 -0
  147. package/dist/src/internals/AutocompleteInteraction.js.map +1 -0
  148. package/dist/src/internals/ButtonInteraction.d.ts +8 -0
  149. package/dist/src/internals/ButtonInteraction.d.ts.map +1 -0
  150. package/dist/src/internals/ButtonInteraction.js +18 -0
  151. package/dist/src/internals/ButtonInteraction.js.map +1 -0
  152. package/dist/src/internals/ChannelSelectMenuInteraction.d.ts +7 -0
  153. package/dist/src/internals/ChannelSelectMenuInteraction.d.ts.map +1 -0
  154. package/dist/src/internals/ChannelSelectMenuInteraction.js +11 -0
  155. package/dist/src/internals/ChannelSelectMenuInteraction.js.map +1 -0
  156. package/dist/src/internals/CommandHandler.d.ts +8 -0
  157. package/dist/src/internals/CommandHandler.d.ts.map +1 -0
  158. package/dist/src/internals/CommandHandler.js +81 -0
  159. package/dist/src/internals/CommandHandler.js.map +1 -0
  160. package/dist/src/internals/CommandInteraction.d.ts +17 -0
  161. package/dist/src/internals/CommandInteraction.d.ts.map +1 -0
  162. package/dist/src/internals/CommandInteraction.js +29 -0
  163. package/dist/src/internals/CommandInteraction.js.map +1 -0
  164. package/dist/src/internals/ComponentHandler.d.ts +6 -0
  165. package/dist/src/internals/ComponentHandler.d.ts.map +1 -0
  166. package/dist/src/internals/ComponentHandler.js +64 -0
  167. package/dist/src/internals/ComponentHandler.js.map +1 -0
  168. package/dist/src/internals/MentionableSelectMenuInteraction.d.ts +8 -0
  169. package/dist/src/internals/MentionableSelectMenuInteraction.d.ts.map +1 -0
  170. package/dist/src/internals/MentionableSelectMenuInteraction.js +15 -0
  171. package/dist/src/internals/MentionableSelectMenuInteraction.js.map +1 -0
  172. package/dist/src/internals/OptionsHandler.d.ts +70 -0
  173. package/dist/src/internals/OptionsHandler.d.ts.map +1 -0
  174. package/dist/src/internals/OptionsHandler.js +115 -0
  175. package/dist/src/internals/OptionsHandler.js.map +1 -0
  176. package/dist/src/internals/RoleSelectMenuInteraction.d.ts +8 -0
  177. package/dist/src/internals/RoleSelectMenuInteraction.d.ts.map +1 -0
  178. package/dist/src/internals/RoleSelectMenuInteraction.js +14 -0
  179. package/dist/src/internals/RoleSelectMenuInteraction.js.map +1 -0
  180. package/dist/src/internals/StringSelectMenuInteraction.d.ts +8 -0
  181. package/dist/src/internals/StringSelectMenuInteraction.d.ts.map +1 -0
  182. package/dist/src/internals/StringSelectMenuInteraction.js +14 -0
  183. package/dist/src/internals/StringSelectMenuInteraction.js.map +1 -0
  184. package/dist/src/internals/UserSelectMenuInteraction.d.ts +8 -0
  185. package/dist/src/internals/UserSelectMenuInteraction.d.ts.map +1 -0
  186. package/dist/src/internals/UserSelectMenuInteraction.js +14 -0
  187. package/dist/src/internals/UserSelectMenuInteraction.js.map +1 -0
  188. package/dist/src/structures/AnySelectMenu.d.ts +31 -0
  189. package/dist/src/structures/AnySelectMenu.d.ts.map +1 -0
  190. package/dist/src/structures/AnySelectMenu.js +19 -0
  191. package/dist/src/structures/AnySelectMenu.js.map +1 -0
  192. package/dist/src/structures/AnySelectMenuInteraction.d.ts +12 -0
  193. package/dist/src/structures/AnySelectMenuInteraction.d.ts.map +1 -0
  194. package/dist/src/structures/AnySelectMenuInteraction.js +21 -0
  195. package/dist/src/structures/AnySelectMenuInteraction.js.map +1 -0
  196. package/dist/src/structures/Base.d.ts +10 -0
  197. package/dist/src/structures/Base.d.ts.map +1 -0
  198. package/dist/src/structures/Base.js +11 -0
  199. package/dist/src/structures/Base.js.map +1 -0
  200. package/dist/src/structures/BaseCommand.d.ts +64 -0
  201. package/dist/src/structures/BaseCommand.d.ts.map +1 -0
  202. package/dist/src/structures/BaseCommand.js +58 -0
  203. package/dist/src/structures/BaseCommand.js.map +1 -0
  204. package/dist/src/structures/BaseComponent.d.ts +34 -0
  205. package/dist/src/structures/BaseComponent.d.ts.map +1 -0
  206. package/dist/src/structures/BaseComponent.js +30 -0
  207. package/dist/src/structures/BaseComponent.js.map +1 -0
  208. package/dist/src/structures/BaseComponentInteraction.d.ts +9 -0
  209. package/dist/src/structures/BaseComponentInteraction.d.ts.map +1 -0
  210. package/dist/src/structures/BaseComponentInteraction.js +14 -0
  211. package/dist/src/structures/BaseComponentInteraction.js.map +1 -0
  212. package/dist/src/structures/BaseInteraction.d.ts +81 -0
  213. package/dist/src/structures/BaseInteraction.d.ts.map +1 -0
  214. package/dist/src/structures/BaseInteraction.js +99 -0
  215. package/dist/src/structures/BaseInteraction.js.map +1 -0
  216. package/dist/src/structures/ButtonInteraction.d.ts +8 -0
  217. package/dist/src/structures/ButtonInteraction.d.ts.map +1 -0
  218. package/dist/src/structures/ButtonInteraction.js +18 -0
  219. package/dist/src/structures/ButtonInteraction.js.map +1 -0
  220. package/dist/src/structures/ChannelSelectMenuInteraction.d.ts +7 -0
  221. package/dist/src/structures/ChannelSelectMenuInteraction.d.ts.map +1 -0
  222. package/dist/src/structures/ChannelSelectMenuInteraction.js +11 -0
  223. package/dist/src/structures/ChannelSelectMenuInteraction.js.map +1 -0
  224. package/dist/src/structures/CommandHandler.d.ts +6 -0
  225. package/dist/src/structures/CommandHandler.d.ts.map +1 -0
  226. package/dist/src/structures/CommandHandler.js +70 -0
  227. package/dist/src/structures/CommandHandler.js.map +1 -0
  228. package/dist/src/structures/CommandInteraction.d.ts +15 -0
  229. package/dist/src/structures/CommandInteraction.d.ts.map +1 -0
  230. package/dist/src/structures/CommandInteraction.js +60 -0
  231. package/dist/src/structures/CommandInteraction.js.map +1 -0
  232. package/dist/src/structures/ComponentHandler.d.ts +6 -0
  233. package/dist/src/structures/ComponentHandler.d.ts.map +1 -0
  234. package/dist/src/structures/ComponentHandler.js +64 -0
  235. package/dist/src/structures/ComponentHandler.js.map +1 -0
  236. package/dist/src/structures/DmChannel.d.ts +18 -0
  237. package/dist/src/structures/DmChannel.d.ts.map +1 -0
  238. package/dist/src/structures/DmChannel.js +24 -0
  239. package/dist/src/structures/DmChannel.js.map +1 -0
  240. package/dist/src/structures/GroupDmChannel.d.ts +67 -0
  241. package/dist/src/structures/GroupDmChannel.d.ts.map +1 -0
  242. package/dist/src/structures/GroupDmChannel.js +109 -0
  243. package/dist/src/structures/GroupDmChannel.js.map +1 -0
  244. package/dist/src/structures/Guild.d.ts +71 -0
  245. package/dist/src/structures/Guild.d.ts.map +1 -0
  246. package/dist/src/structures/Guild.js +123 -0
  247. package/dist/src/structures/Guild.js.map +1 -0
  248. package/dist/src/structures/GuildAnnouncementChannel.d.ts +12 -0
  249. package/dist/src/structures/GuildAnnouncementChannel.d.ts.map +1 -0
  250. package/dist/src/structures/GuildAnnouncementChannel.js +17 -0
  251. package/dist/src/structures/GuildAnnouncementChannel.js.map +1 -0
  252. package/dist/src/structures/GuildCategoryChannel.d.ts +13 -0
  253. package/dist/src/structures/GuildCategoryChannel.d.ts.map +1 -0
  254. package/dist/src/structures/GuildCategoryChannel.js +14 -0
  255. package/dist/src/structures/GuildCategoryChannel.js.map +1 -0
  256. package/dist/src/structures/GuildForumChannel.d.ts +13 -0
  257. package/dist/src/structures/GuildForumChannel.d.ts.map +1 -0
  258. package/dist/src/structures/GuildForumChannel.js +14 -0
  259. package/dist/src/structures/GuildForumChannel.js.map +1 -0
  260. package/dist/src/structures/GuildMediaChannel.d.ts +13 -0
  261. package/dist/src/structures/GuildMediaChannel.d.ts.map +1 -0
  262. package/dist/src/structures/GuildMediaChannel.js +12 -0
  263. package/dist/src/structures/GuildMediaChannel.js.map +1 -0
  264. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts +30 -0
  265. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts.map +1 -0
  266. package/dist/src/structures/GuildStageOrVoiceChannel.js +34 -0
  267. package/dist/src/structures/GuildStageOrVoiceChannel.js.map +1 -0
  268. package/dist/src/structures/GuildTextChannel.d.ts +15 -0
  269. package/dist/src/structures/GuildTextChannel.d.ts.map +1 -0
  270. package/dist/src/structures/GuildTextChannel.js +18 -0
  271. package/dist/src/structures/GuildTextChannel.js.map +1 -0
  272. package/dist/src/structures/GuildThreadChannel.d.ts +89 -0
  273. package/dist/src/structures/GuildThreadChannel.d.ts.map +1 -0
  274. package/dist/src/structures/GuildThreadChannel.js +134 -0
  275. package/dist/src/structures/GuildThreadChannel.js.map +1 -0
  276. package/dist/src/structures/MentionableSelectMenuInteraction.d.ts +8 -0
  277. package/dist/src/structures/MentionableSelectMenuInteraction.d.ts.map +1 -0
  278. package/dist/src/structures/MentionableSelectMenuInteraction.js +15 -0
  279. package/dist/src/structures/MentionableSelectMenuInteraction.js.map +1 -0
  280. package/dist/src/structures/Message.d.ts +52 -0
  281. package/dist/src/structures/Message.d.ts.map +1 -0
  282. package/dist/src/structures/Message.js +93 -0
  283. package/dist/src/structures/Message.js.map +1 -0
  284. package/dist/src/structures/Role.d.ts +106 -0
  285. package/dist/src/structures/Role.d.ts.map +1 -0
  286. package/dist/src/structures/Role.js +181 -0
  287. package/dist/src/structures/Role.js.map +1 -0
  288. package/dist/src/structures/RoleSelectMenuInteraction.d.ts +8 -0
  289. package/dist/src/structures/RoleSelectMenuInteraction.d.ts.map +1 -0
  290. package/dist/src/structures/RoleSelectMenuInteraction.js +14 -0
  291. package/dist/src/structures/RoleSelectMenuInteraction.js.map +1 -0
  292. package/dist/src/structures/StringSelectMenuInteraction.d.ts +8 -0
  293. package/dist/src/structures/StringSelectMenuInteraction.d.ts.map +1 -0
  294. package/dist/src/structures/StringSelectMenuInteraction.js +14 -0
  295. package/dist/src/structures/StringSelectMenuInteraction.js.map +1 -0
  296. package/dist/src/structures/User.d.ts +80 -0
  297. package/dist/src/structures/User.d.ts.map +1 -0
  298. package/dist/src/structures/User.js +133 -0
  299. package/dist/src/structures/User.js.map +1 -0
  300. package/dist/src/structures/UserSelectMenuInteraction.d.ts +8 -0
  301. package/dist/src/structures/UserSelectMenuInteraction.d.ts.map +1 -0
  302. package/dist/src/structures/UserSelectMenuInteraction.js +14 -0
  303. package/dist/src/structures/UserSelectMenuInteraction.js.map +1 -0
  304. package/dist/src/types.d.ts +31 -0
  305. package/dist/src/types.d.ts.map +1 -0
  306. package/dist/src/types.js +33 -0
  307. package/dist/src/types.js.map +1 -0
  308. package/dist/src/utils.d.ts +2 -0
  309. package/dist/src/utils.d.ts.map +1 -0
  310. package/dist/src/utils.js +11 -0
  311. package/dist/src/utils.js.map +1 -0
  312. package/dist/tsconfig.tsbuildinfo +1 -0
  313. package/docs/classes/AnySelectMenu.mdx +114 -0
  314. package/docs/classes/AnySelectMenuInteraction.mdx +161 -0
  315. package/docs/classes/AutocompleteInteraction.mdx +152 -0
  316. package/docs/classes/AutocompleteOptionsHandler.mdx +243 -0
  317. package/docs/classes/BaseChannel.mdx +97 -0
  318. package/docs/classes/BaseCommand.mdx +61 -0
  319. package/docs/classes/BaseComponent.mdx +55 -0
  320. package/docs/classes/BaseComponentInteraction.mdx +146 -0
  321. package/docs/classes/BaseGuildChannel.mdx +262 -0
  322. package/docs/classes/BaseGuildTextChannel.mdx +360 -0
  323. package/docs/classes/BaseInteraction.mdx +127 -0
  324. package/docs/classes/Button.mdx +99 -0
  325. package/docs/classes/ButtonInteraction.mdx +141 -0
  326. package/docs/classes/ChannelSelectMenu.mdx +122 -0
  327. package/docs/classes/ChannelSelectMenuInteraction.mdx +157 -0
  328. package/docs/classes/Client.mdx +48 -0
  329. package/docs/classes/Command.mdx +111 -0
  330. package/docs/classes/CommandHandler.mdx +65 -0
  331. package/docs/classes/CommandInteraction.mdx +141 -0
  332. package/docs/classes/CommandWithSubcommandGroups.mdx +73 -0
  333. package/docs/classes/CommandWithSubcommands.mdx +76 -0
  334. package/docs/classes/ComponentHandler.mdx +49 -0
  335. package/docs/classes/DmChannel.mdx +118 -0
  336. package/docs/classes/GroupDmChannel.mdx +197 -0
  337. package/docs/classes/Guild.mdx +139 -0
  338. package/docs/classes/GuildAnnouncementChannel.mdx +377 -0
  339. package/docs/classes/GuildCategoryChannel.mdx +272 -0
  340. package/docs/classes/GuildForumChannel.mdx +333 -0
  341. package/docs/classes/GuildMediaChannel.mdx +327 -0
  342. package/docs/classes/GuildStageChannel.mdx +276 -0
  343. package/docs/classes/GuildStageOrVoiceChannel.mdx +292 -0
  344. package/docs/classes/GuildTextChannel.mdx +367 -0
  345. package/docs/classes/GuildThreadChannel.mdx +425 -0
  346. package/docs/classes/GuildThreadOnlyChannel.mdx +333 -0
  347. package/docs/classes/GuildVoiceChannel.mdx +276 -0
  348. package/docs/classes/LinkButton.mdx +84 -0
  349. package/docs/classes/MentionableSelectMenu.mdx +120 -0
  350. package/docs/classes/MentionableSelectMenuInteraction.mdx +157 -0
  351. package/docs/classes/Message.mdx +126 -0
  352. package/docs/classes/OptionsHandler.mdx +203 -0
  353. package/docs/classes/PremiumButton.mdx +84 -0
  354. package/docs/classes/Role.mdx +228 -0
  355. package/docs/classes/RoleSelectMenu.mdx +120 -0
  356. package/docs/classes/RoleSelectMenuInteraction.mdx +157 -0
  357. package/docs/classes/Row.mdx +88 -0
  358. package/docs/classes/StringSelectMenu.mdx +120 -0
  359. package/docs/classes/StringSelectMenuInteraction.mdx +157 -0
  360. package/docs/classes/User.mdx +119 -0
  361. package/docs/classes/UserSelectMenu.mdx +120 -0
  362. package/docs/classes/UserSelectMenuInteraction.mdx +157 -0
  363. package/docs/enumerations/ClientMode.mdx +16 -0
  364. package/docs/functions/channelFactory.mdx +16 -0
  365. package/docs/index.mdx +83 -0
  366. package/docs/type-aliases/AnySelectMenuComponentType.mdx +5 -0
  367. package/docs/type-aliases/ClientOptions.mdx +20 -0
  368. package/docs/type-aliases/CommandOptions.mdx +5 -0
  369. package/docs/type-aliases/ComponentAdditionalData.mdx +9 -0
  370. package/docs/type-aliases/InteractionFileData.mdx +15 -0
  371. package/docs/type-aliases/InteractionReplyData.mdx +14 -0
  372. package/docs/type-aliases/InteractionReplyOptions.mdx +13 -0
  373. package/docs/type-aliases/RawOptions.mdx +9 -0
  374. package/docs/type-aliases/meta.json +3 -0
  375. package/package.json +18 -0
  376. package/src/README.md +7 -0
  377. package/src/abstracts/AnySelectMenu.ts +63 -0
  378. package/src/abstracts/AnySelectMenuInteraction.ts +29 -0
  379. package/src/abstracts/Base.ts +12 -0
  380. package/src/abstracts/BaseChannel.ts +73 -0
  381. package/src/abstracts/BaseCommand.ts +95 -0
  382. package/src/abstracts/BaseComponent.ts +49 -0
  383. package/src/abstracts/BaseComponentInteraction.ts +19 -0
  384. package/src/abstracts/BaseGuildChannel.ts +152 -0
  385. package/src/abstracts/BaseGuildTextChannel.ts +77 -0
  386. package/src/abstracts/BaseInteraction.ts +170 -0
  387. package/src/abstracts/GuildThreadOnlyChannel.ts +71 -0
  388. package/src/classes/Button.ts +95 -0
  389. package/src/classes/ChannelSelectMenu.ts +21 -0
  390. package/src/classes/Client.ts +249 -0
  391. package/src/classes/Command.ts +51 -0
  392. package/src/classes/CommandWithSubcommandGroups.ts +47 -0
  393. package/src/classes/CommandWithSubcommands.ts +35 -0
  394. package/src/classes/MentionableSelectMenu.ts +19 -0
  395. package/src/classes/RoleSelectMenu.ts +19 -0
  396. package/src/classes/Row.ts +44 -0
  397. package/src/classes/StringSelectMenu.ts +19 -0
  398. package/src/classes/UserSelectMenu.ts +19 -0
  399. package/src/factories/channelFactory.ts +43 -0
  400. package/src/index.ts +59 -0
  401. package/src/internals/AutocompleteInteraction.ts +107 -0
  402. package/src/internals/ButtonInteraction.ts +26 -0
  403. package/src/internals/ChannelSelectMenuInteraction.ts +15 -0
  404. package/src/internals/CommandHandler.ts +123 -0
  405. package/src/internals/CommandInteraction.ts +49 -0
  406. package/src/internals/ComponentHandler.ts +81 -0
  407. package/src/internals/MentionableSelectMenuInteraction.ts +21 -0
  408. package/src/internals/OptionsHandler.ts +147 -0
  409. package/src/internals/RoleSelectMenuInteraction.ts +20 -0
  410. package/src/internals/StringSelectMenuInteraction.ts +20 -0
  411. package/src/internals/UserSelectMenuInteraction.ts +20 -0
  412. package/src/structures/DmChannel.ts +31 -0
  413. package/src/structures/GroupDmChannel.ts +132 -0
  414. package/src/structures/Guild.ts +142 -0
  415. package/src/structures/GuildAnnouncementChannel.ts +20 -0
  416. package/src/structures/GuildCategoryChannel.ts +16 -0
  417. package/src/structures/GuildForumChannel.ts +20 -0
  418. package/src/structures/GuildMediaChannel.ts +13 -0
  419. package/src/structures/GuildStageOrVoiceChannel.ts +46 -0
  420. package/src/structures/GuildTextChannel.ts +21 -0
  421. package/src/structures/GuildThreadChannel.ts +150 -0
  422. package/src/structures/Message.ts +124 -0
  423. package/src/structures/Role.ts +201 -0
  424. package/src/structures/User.ts +153 -0
  425. package/src/utils.ts +13 -0
  426. package/tests/index.test.ts +4 -0
  427. package/tsconfig.json +12 -0
  428. package/typedoc.json +9 -0
@@ -0,0 +1,68 @@
1
+ import { type APIGuildChannel, type APIMessage, type GuildChannelType, type RESTGetAPIGuildInvitesResult, type RESTPostAPIChannelInviteJSONBody } from "discord-api-types/v10";
2
+ import { Guild } from "../structures/Guild.js";
3
+ import type { GuildCategoryChannel } from "../structures/GuildCategoryChannel.js";
4
+ import { BaseChannel } from "./BaseChannel.js";
5
+ export declare abstract class BaseGuildChannel<Type extends GuildChannelType> extends BaseChannel<Type> {
6
+ /**
7
+ * The name of the channel.
8
+ */
9
+ name?: string;
10
+ /**
11
+ * The ID of the guild this channel is in
12
+ */
13
+ guildId?: string;
14
+ /**
15
+ * The position of the channel in the channel list.
16
+ */
17
+ position?: number;
18
+ /**
19
+ * The ID of the parent category for the channel.
20
+ */
21
+ parentId?: string | null;
22
+ /**
23
+ * Whether the channel is marked as nsfw.
24
+ */
25
+ nsfw?: boolean;
26
+ /**
27
+ * The guild this channel is in
28
+ */
29
+ get guild(): Guild;
30
+ protected setData(data: APIGuildChannel<Type>): void;
31
+ /**
32
+ * Set the name of the channel
33
+ * @param name The new name of the channel
34
+ */
35
+ setName(name: string): Promise<void>;
36
+ /**
37
+ * Set the position of the channel
38
+ * @param position The new position of the channel
39
+ */
40
+ setPosition(position: number): Promise<void>;
41
+ /**
42
+ * Set the parent ID of the channel
43
+ * @param parent The new category channel or ID to set
44
+ */
45
+ setParent(parent: GuildCategoryChannel | string): Promise<void>;
46
+ /**
47
+ * Set whether the channel is nsfw
48
+ * @param nsfw The new nsfw status of the channel
49
+ */
50
+ setNsfw(nsfw: boolean): Promise<void>;
51
+ /**
52
+ * Send a message to the channel
53
+ */
54
+ send(message: APIMessage): Promise<void>;
55
+ /**
56
+ * Get the invites for the channel
57
+ */
58
+ getInvites(): Promise<RESTGetAPIGuildInvitesResult>;
59
+ /**
60
+ * Create an invite for the channel
61
+ */
62
+ createInvite(options?: RESTPostAPIChannelInviteJSONBody): Promise<import("discord-api-types/v10").APIExtendedInvite>;
63
+ /**
64
+ * Trigger a typing indicator in the channel (this will expire after 10 seconds)
65
+ */
66
+ triggerTyping(): Promise<void>;
67
+ }
68
+ //# sourceMappingURL=BaseGuildChannel.d.ts.map
@@ -0,0 +1 @@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0 +1,130 @@
1
+ import { Routes } from "discord-api-types/v10";
2
+ import { Guild } from "../structures/Guild.js";
3
+ import { BaseChannel } from "./BaseChannel.js";
4
+ export class BaseGuildChannel extends BaseChannel {
5
+ /**
6
+ * The name of the channel.
7
+ */
8
+ name;
9
+ /**
10
+ * The ID of the guild this channel is in
11
+ */
12
+ guildId;
13
+ /**
14
+ * The position of the channel in the channel list.
15
+ */
16
+ position;
17
+ /**
18
+ * The ID of the parent category for the channel.
19
+ */
20
+ parentId;
21
+ /**
22
+ * Whether the channel is marked as nsfw.
23
+ */
24
+ nsfw;
25
+ /**
26
+ * The guild this channel is in
27
+ */
28
+ get guild() {
29
+ if (!this.guildId)
30
+ throw new Error("Cannot get guild without guild ID");
31
+ return new Guild(this.client, this.guildId);
32
+ }
33
+ setData(data) {
34
+ this.rawData = data;
35
+ this.partial = false;
36
+ this.name = data.name;
37
+ this.guildId = data.guild_id;
38
+ this.position = data.position;
39
+ this.parentId = data.parent_id;
40
+ this.nsfw = data.nsfw;
41
+ this.setSpecificData(data);
42
+ }
43
+ /**
44
+ * Set the name of the channel
45
+ * @param name The new name of the channel
46
+ */
47
+ async setName(name) {
48
+ await this.client.rest.patch(Routes.channel(this.id), {
49
+ body: {
50
+ name
51
+ }
52
+ });
53
+ this.name = name;
54
+ }
55
+ /**
56
+ * Set the position of the channel
57
+ * @param position The new position of the channel
58
+ */
59
+ async setPosition(position) {
60
+ await this.client.rest.patch(Routes.channel(this.id), {
61
+ body: {
62
+ position
63
+ }
64
+ });
65
+ this.position = position;
66
+ }
67
+ /**
68
+ * Set the parent ID of the channel
69
+ * @param parent The new category channel or ID to set
70
+ */
71
+ async setParent(parent) {
72
+ if (typeof parent === "string") {
73
+ await this.client.rest.patch(Routes.channel(this.id), {
74
+ body: {
75
+ parent_id: parent
76
+ }
77
+ });
78
+ this.parentId = parent;
79
+ }
80
+ else {
81
+ await this.client.rest.patch(Routes.channel(this.id), {
82
+ body: {
83
+ parent_id: parent.id
84
+ }
85
+ });
86
+ this.parentId = parent.id;
87
+ }
88
+ }
89
+ /**
90
+ * Set whether the channel is nsfw
91
+ * @param nsfw The new nsfw status of the channel
92
+ */
93
+ async setNsfw(nsfw) {
94
+ await this.client.rest.patch(Routes.channel(this.id), {
95
+ body: {
96
+ nsfw
97
+ }
98
+ });
99
+ this.nsfw = nsfw;
100
+ }
101
+ /**
102
+ * Send a message to the channel
103
+ */
104
+ async send(message) {
105
+ this.client.rest.post(Routes.channelMessages(this.id), {
106
+ body: { ...message }
107
+ });
108
+ }
109
+ /**
110
+ * Get the invites for the channel
111
+ */
112
+ async getInvites() {
113
+ return (await this.client.rest.get(Routes.channelInvites(this.id)));
114
+ }
115
+ /**
116
+ * Create an invite for the channel
117
+ */
118
+ async createInvite(options) {
119
+ return (await this.client.rest.post(Routes.channelInvites(this.id), {
120
+ body: { ...options }
121
+ }));
122
+ }
123
+ /**
124
+ * Trigger a typing indicator in the channel (this will expire after 10 seconds)
125
+ */
126
+ async triggerTyping() {
127
+ await this.client.rest.post(Routes.channelTyping(this.id));
128
+ }
129
+ }
130
+ //# sourceMappingURL=BaseGuildChannel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseGuildChannel.js","sourceRoot":"","sources":["../../../src/abstracts/BaseGuildChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EAQN,MAAM,EACN,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,OAAgB,gBAEpB,SAAQ,WAAiB;IAC1B;;OAEG;IACH,IAAI,CAAS;IACb;;OAEG;IACH,OAAO,CAAS;IAChB;;OAEG;IACH,QAAQ,CAAS;IACjB;;OAEG;IACH,QAAQ,CAAgB;IACxB;;OAEG;IACH,IAAI,CAAU;IAEd;;OAEG;IACH,IAAI,KAAK;QACR,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,MAAM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Y,CAAC,OAA0C;QAC5D,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;YACnE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE;SACpB,CAAC,CAAmC,CAAA;IACtC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,aAAa;QAClB,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3D,CAAC;CACD"}
@@ -0,0 +1,42 @@
1
+ import { type APIGuildTextChannel, type GuildTextChannelType, type RESTPostAPIChannelThreadsJSONBody } from "discord-api-types/v10";
2
+ import { GuildThreadChannel } from "../structures/GuildThreadChannel.js";
3
+ import { Message } from "../structures/Message.js";
4
+ import { BaseGuildChannel } from "./BaseGuildChannel.js";
5
+ export declare abstract class BaseGuildTextChannel<Type extends GuildTextChannelType> extends BaseGuildChannel<Type> {
6
+ /**
7
+ * The ID of the last message sent in the channel.
8
+ *
9
+ * @remarks
10
+ * This might not always resolve to a message. The ID still stays a part of the channel's data, even if the message is deleted.
11
+ */
12
+ lastMessageId?: string | null;
13
+ /**
14
+ * The timestamp of the last pin in the channel.
15
+ */
16
+ lastPinTimestamp?: string | null;
17
+ /**
18
+ * The rate limit per user for the channel, in seconds.
19
+ */
20
+ rateLimitPerUser?: number | null;
21
+ protected setSpecificData(data: APIGuildTextChannel<Type>): void;
22
+ protected abstract setMoreSpecificData(data: APIGuildTextChannel<Type>): void;
23
+ /**
24
+ * The last message sent in the channel.
25
+ *
26
+ * @remarks
27
+ * This might not always resolve to a message. The ID still stays a part of the channel's data, even if the message is deleted.
28
+ * This will always return a partial message, so you can use {@link Message.fetch} to get the full message data.
29
+ *
30
+ */
31
+ get lastMessage(): Message | null;
32
+ /**
33
+ * Get the pinned messages in the channel
34
+ */
35
+ getPinnedMessages(): Promise<Message[]>;
36
+ /**
37
+ * Start a thread without an associated start message.
38
+ * If you want to start a thread with a start message, use {@link Message.startThread}
39
+ */
40
+ startThread(data: RESTPostAPIChannelThreadsJSONBody): Promise<GuildThreadChannel<import("discord-api-types/v10").ThreadChannelType>>;
41
+ }
42
+ //# sourceMappingURL=BaseGuildTextChannel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseGuildTextChannel.d.ts","sourceRoot":"","sources":["../../../src/abstracts/BaseGuildTextChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,mBAAmB,EAExB,KAAK,oBAAoB,EAEzB,KAAK,iCAAiC,EAEtC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,8BAAsB,oBAAoB,CACzC,IAAI,SAAS,oBAAoB,CAChC,SAAQ,gBAAgB,CAAC,IAAI,CAAC;IAC/B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEhC,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC,GAAG,IAAI;IAOhE,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC,GAAG,IAAI;IAE7E;;;;;;;OAOG;IACH,IAAI,WAAW,mBAMd;IAED;;OAEG;IACG,iBAAiB;IAOvB;;;OAGG;IACG,WAAW,CAAC,IAAI,EAAE,iCAAiC;CAMzD"}
@@ -0,0 +1,61 @@
1
+ import { Routes } from "discord-api-types/v10";
2
+ import { GuildThreadChannel } from "../structures/GuildThreadChannel.js";
3
+ import { Message } from "../structures/Message.js";
4
+ import { BaseGuildChannel } from "./BaseGuildChannel.js";
5
+ export class BaseGuildTextChannel extends BaseGuildChannel {
6
+ /**
7
+ * The ID of the last message sent in the channel.
8
+ *
9
+ * @remarks
10
+ * This might not always resolve to a message. The ID still stays a part of the channel's data, even if the message is deleted.
11
+ */
12
+ lastMessageId;
13
+ /**
14
+ * The timestamp of the last pin in the channel.
15
+ */
16
+ lastPinTimestamp;
17
+ /**
18
+ * The rate limit per user for the channel, in seconds.
19
+ */
20
+ rateLimitPerUser;
21
+ setSpecificData(data) {
22
+ this.lastMessageId = data.last_message_id;
23
+ this.lastPinTimestamp = data.last_pin_timestamp;
24
+ this.rateLimitPerUser = data.rate_limit_per_user;
25
+ this.setMoreSpecificData(data);
26
+ }
27
+ /**
28
+ * The last message sent in the channel.
29
+ *
30
+ * @remarks
31
+ * This might not always resolve to a message. The ID still stays a part of the channel's data, even if the message is deleted.
32
+ * This will always return a partial message, so you can use {@link Message.fetch} to get the full message data.
33
+ *
34
+ */
35
+ get lastMessage() {
36
+ if (!this.lastMessageId)
37
+ return null;
38
+ return new Message(this.client, {
39
+ id: this.lastMessageId,
40
+ channel_id: this.id
41
+ });
42
+ }
43
+ /**
44
+ * Get the pinned messages in the channel
45
+ */
46
+ async getPinnedMessages() {
47
+ const msgs = (await this.client.rest.get(Routes.channelPins(this.id)));
48
+ return msgs.map((x) => new Message(this.client, x));
49
+ }
50
+ /**
51
+ * Start a thread without an associated start message.
52
+ * If you want to start a thread with a start message, use {@link Message.startThread}
53
+ */
54
+ async startThread(data) {
55
+ const thread = (await this.client.rest.post(Routes.threads(this.id), {
56
+ body: { ...data }
57
+ }));
58
+ return new GuildThreadChannel(this.client, thread);
59
+ }
60
+ }
61
+ //# sourceMappingURL=BaseGuildTextChannel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseGuildTextChannel.js","sourceRoot":"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AC,CAAA;IACpD,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,WAAW,CAAC,IAAuC;QACxD,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;YACpE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE;SACjB,CAAC,CAAqB,CAAA;QACvB,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnD,CAAC;CACD"}
@@ -0,0 +1,87 @@
1
+ import { type APIInteraction, type InteractionType } from "discord-api-types/v10";
2
+ import type { Client } from "../classes/Client.js";
3
+ import type { Row } from "../classes/Row.js";
4
+ import { Guild } from "../structures/Guild.js";
5
+ import { Message } from "../structures/Message.js";
6
+ import { User } from "../structures/User.js";
7
+ import { Base } from "./Base.js";
8
+ /**
9
+ * The data to reply to an interaction
10
+ */
11
+ export type InteractionReplyData = {
12
+ /**
13
+ * The content of the message
14
+ */
15
+ content?: string;
16
+ /**
17
+ * The components to send in the message, listed in rows
18
+ */
19
+ components?: Row[];
20
+ };
21
+ /**
22
+ * Additional options for replying to an interaction
23
+ */
24
+ export type InteractionReplyOptions = {
25
+ /**
26
+ * The files to send in the interaction
27
+ */
28
+ files?: InteractionFileData[];
29
+ };
30
+ /**
31
+ * The data for a file to send in an interaction
32
+ */
33
+ export type InteractionFileData = {
34
+ /**
35
+ * The name of the file that will be given to Discord
36
+ */
37
+ name: string;
38
+ /**
39
+ * The data of the file in a Blob
40
+ */
41
+ data: Blob;
42
+ /**
43
+ * The alt text of the file, shown for accessibility
44
+ * @alpha This isn't implemented yet
45
+ */
46
+ description?: string;
47
+ };
48
+ /**
49
+ * This is the base type interaction, all interaction types extend from this
50
+ */
51
+ export declare abstract class BaseInteraction<T extends APIInteraction> extends Base {
52
+ /**
53
+ * The type of interaction
54
+ */
55
+ type: InteractionType;
56
+ /**
57
+ * The raw data of the interaction
58
+ */
59
+ rawData: T;
60
+ /**
61
+ * The user who sent the interaction
62
+ */
63
+ userId: string | undefined;
64
+ /**
65
+ * Whether the interaction is deferred already
66
+ * @internal
67
+ */
68
+ _deferred: boolean;
69
+ constructor(client: Client, data: T);
70
+ get message(): Message | null;
71
+ get guild(): Guild | null;
72
+ get user(): User | null;
73
+ get channel(): import("../index.js").DmChannel | import("../index.js").GroupDmChannel | import("../index.js").GuildTextChannel | import("../index.js").GuildVoiceChannel | import("../index.js").GuildCategoryChannel | import("../index.js").GuildAnnouncementChannel | import("../index.js").GuildThreadChannel<import("discord-api-types/v10").ThreadChannelType> | import("../index.js").GuildStageChannel | import("../index.js").GuildForumChannel | import("../index.js").GuildMediaChannel | null;
74
+ /**
75
+ * Reply to an interaction.
76
+ * If the interaction is deferred, this will edit the original response.
77
+ * @param data The response data
78
+ */
79
+ reply(data: InteractionReplyData, options?: InteractionReplyOptions): Promise<void>;
80
+ /**
81
+ * Defer the interaction response. This is used automatically by commands that are set to defer.
82
+ * If the interaction is already deferred, this will do nothing.
83
+ * @internal
84
+ */
85
+ defer(): Promise<void>;
86
+ }
87
+ //# sourceMappingURL=BaseInteraction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseInteraction.d.ts","sourceRoot":"","sources":["../../../src/abstracts/BaseInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,cAAc,EAEnB,KAAK,eAAe,EAEpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,EAAE,CAAA;CAClB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAA;CAC7B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IACV;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;GAEG;AACH,8BAAsB,eAAe,CAAC,CAAC,SAAS,cAAc,CAAE,SAAQ,IAAI;IAC3E;;OAEG;IACH,IAAI,EAAE,eAAe,CAAA;IACrB;;OAEG;IACH,OAAO,EAAE,CAAC,CAAA;IACV;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAE1B;;;OAGG;IACH,SAAS,UAAQ;gBAEL,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAQnC,IAAI,OAAO,IAAI,OAAO,GAAG,IAAI,CAG5B;IAED,IAAI,KAAK,IAAI,KAAK,GAAG,IAAI,CAGxB;IAED,IAAI,IAAI,IAAI,IAAI,GAAG,IAAI,CAKtB;IAED,IAAI,OAAO,+dAGV;IAED;;;;OAIG;IACG,KAAK,CACV,IAAI,EAAE,oBAAoB,EAC1B,OAAO,GAAE,uBAA4B;IAkCtC;;;;OAIG;IACG,KAAK;CAYX"}
@@ -0,0 +1,101 @@
1
+ import { InteractionResponseType, Routes } from "discord-api-types/v10";
2
+ import { channelFactory } from "../factories/channelFactory.js";
3
+ import { Guild } from "../structures/Guild.js";
4
+ import { Message } from "../structures/Message.js";
5
+ import { User } from "../structures/User.js";
6
+ import { Base } from "./Base.js";
7
+ /**
8
+ * This is the base type interaction, all interaction types extend from this
9
+ */
10
+ export class BaseInteraction extends Base {
11
+ /**
12
+ * The type of interaction
13
+ */
14
+ type;
15
+ /**
16
+ * The raw data of the interaction
17
+ */
18
+ rawData;
19
+ /**
20
+ * The user who sent the interaction
21
+ */
22
+ userId;
23
+ /**
24
+ * Whether the interaction is deferred already
25
+ * @internal
26
+ */
27
+ _deferred = false;
28
+ constructor(client, data) {
29
+ super(client);
30
+ this.rawData = data;
31
+ this.type = data.type;
32
+ this.userId =
33
+ this.rawData.user?.id || this.rawData.member?.user.id || undefined;
34
+ }
35
+ get message() {
36
+ if (!this.rawData.message)
37
+ return null;
38
+ return new Message(this.client, this.rawData.message);
39
+ }
40
+ get guild() {
41
+ if (!this.rawData.guild_id)
42
+ return null;
43
+ return new Guild(this.client, this.rawData.guild_id);
44
+ }
45
+ get user() {
46
+ if (this.rawData.user)
47
+ return new User(this.client, this.rawData.user);
48
+ if (this.rawData.member)
49
+ return new User(this.client, this.rawData.member.user);
50
+ return null;
51
+ }
52
+ get channel() {
53
+ if (!this.rawData.channel)
54
+ return null;
55
+ return channelFactory(this.client, this.rawData.channel);
56
+ }
57
+ /**
58
+ * Reply to an interaction.
59
+ * If the interaction is deferred, this will edit the original response.
60
+ * @param data The response data
61
+ */
62
+ async reply(data, options = {}) {
63
+ if (this._deferred) {
64
+ await this.client.rest.patch(Routes.webhookMessage(this.client.options.clientId, this.rawData.token, "@original"), {
65
+ body: {
66
+ ...data,
67
+ components: data.components?.map((row) => row.serialize())
68
+ },
69
+ files: options.files
70
+ });
71
+ }
72
+ else {
73
+ await this.client.rest.post(Routes.interactionCallback(this.rawData.id, this.rawData.token), {
74
+ body: {
75
+ type: InteractionResponseType.ChannelMessageWithSource,
76
+ data: {
77
+ ...data,
78
+ components: data.components?.map((row) => row.serialize())
79
+ }
80
+ },
81
+ files: options.files
82
+ });
83
+ }
84
+ }
85
+ /**
86
+ * Defer the interaction response. This is used automatically by commands that are set to defer.
87
+ * If the interaction is already deferred, this will do nothing.
88
+ * @internal
89
+ */
90
+ async defer() {
91
+ if (this._deferred)
92
+ return;
93
+ this._deferred = true;
94
+ await this.client.rest.post(Routes.interactionCallback(this.rawData.id, this.rawData.token), {
95
+ body: {
96
+ type: InteractionResponseType.DeferredChannelMessageWithSource
97
+ }
98
+ });
99
+ }
100
+ }
101
+ //# sourceMappingURL=BaseInteraction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseInteraction.js","sourceRoot":"","sources":["../../../src/abstracts/BaseInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,uBAAuB,EAEvB,MAAM,EACN,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AA6ChC;;GAEG;AACH,MAAM,OAAgB,eAA0C,SAAQ,IAAI;IAC3E;;OAEG;IACH,IAAI,CAAiB;IACrB;;OAEG;IACH,OAAO,CAAG;IACV;;OAEG;IACH,MAAM,CAAoB;IAE1B;;;OAGG;IACH,SAAS,GAAG,KAAK,CAAA;IAEjB,YAAY,MAAc,EAAE,IAAO;QAClC,KAAK,CAAC,MAAM,CAAC,CAAA;QACb,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;QACrB,IAAI,CAAC,MAAM;YACV,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,SAAS,CAAA;IACpE,CAAC;IAED,IAAI,OAAO;QACV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AG,IAAI;oBACP,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;iBAC1D;gBACD,KAAK,EAAE,OAAO,CAAC,KAAK;aACpB,CACD,CAAA;QACF,CAAC;aAAM,CAAC;YACP,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAC1B,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAC/D;gBACC,IAAI,EAAE;oBACL,IAAI,EAAE,uBAAuB,CAAC,wBAAwB;oBACtD,IAAI,EAAE;wBACL,GAAG,IAAI;wBACP,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;qBAC1D;iBACD;gBACD,KAAK,EAAE,OAAO,CAAC,KAAK;aACpB,CACD,CAAA;QACF,CAAC;IACF,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,KAAK;QACV,IAAI,IAAI,CAAC,SAAS;YAAE,OAAM;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;QACrB,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAC1B,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAC/D;YACC,IAAI,EAAE;gBACL,IAAI,EAAE,uBAAuB,CAAC,gCAAgC;aAC9D;SACD,CACD,CAAA;IACF,CAAC;CACD"}
@@ -0,0 +1,8 @@
1
+ import { type APIMessageComponentButtonInteraction } from "discord-api-types/v10";
2
+ import type { Client } from "../classes/Client.js";
3
+ import { BaseComponentInteraction } from "./BaseComponentInteraction.js";
4
+ export declare class ButtonInteraction extends BaseComponentInteraction {
5
+ customId: string;
6
+ constructor(client: Client, data: APIMessageComponentButtonInteraction);
7
+ }
8
+ //# sourceMappingURL=ButtonInteraction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonInteraction.d.ts","sourceRoot":"","sources":["../../../src/abstracts/ButtonInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,oCAAoC,EAGzC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,qBAAa,iBAAkB,SAAQ,wBAAwB;IAC9D,QAAQ,EAAE,MAAM,CAEZ;gBACQ,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,oCAAoC;CAWtE"}
@@ -0,0 +1,18 @@
1
+ import { ComponentType, InteractionType } from "discord-api-types/v10";
2
+ import { splitCustomId } from "../utils.js";
3
+ import { BaseComponentInteraction } from "./BaseComponentInteraction.js";
4
+ export class ButtonInteraction extends BaseComponentInteraction {
5
+ customId = splitCustomId(this.rawData.data.custom_id)[0];
6
+ constructor(client, data) {
7
+ super(client, data);
8
+ if (!data.data)
9
+ throw new Error("Invalid interaction data was used to create this class");
10
+ if (data.type !== InteractionType.MessageComponent) {
11
+ throw new Error("Invalid interaction type was used to create this class");
12
+ }
13
+ if (data.data.component_type !== ComponentType.Button) {
14
+ throw new Error("Invalid component type was used to create this class");
15
+ }
16
+ }
17
+ }
18
+ //# sourceMappingURL=ButtonInteraction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonInteraction.js","sourceRoot":"","sources":["../../../src/abstracts/ButtonInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,eAAe,EACf,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,MAAM,OAAO,iBAAkB,SAAQ,wBAAwB;IAC9D,QAAQ,GAAW,aAAa,CAC9B,IAAI,CAAC,OAAO,CAAC,IAAwC,CAAC,SAAS,CAChE,CAAC,CAAC,CAAC,CAAA;IACJ,YAAY,MAAc,EAAE,IAA0C;QACrE,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnB,IAAI,CAAC,IAAI,CAAC,IAAI;YACb,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC1E,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC,gBAAgB,EAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC1E,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,MAAM,EAAE,CAAC;YACvD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;CACD"}
@@ -0,0 +1,7 @@
1
+ import { type APIMessageComponentSelectMenuInteraction } from "discord-api-types/v10";
2
+ import type { Client } from "../classes/Client.js";
3
+ import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
4
+ export declare class ChannelSelectMenuInteraction extends AnySelectMenuInteraction {
5
+ constructor(client: Client, data: APIMessageComponentSelectMenuInteraction);
6
+ }
7
+ //# sourceMappingURL=ChannelSelectMenuInteraction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChannelSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/abstracts/ChannelSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAE7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,qBAAa,4BAA6B,SAAQ,wBAAwB;gBAC7D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,wCAAwC;CAM1E"}
@@ -0,0 +1,11 @@
1
+ import { ComponentType } from "discord-api-types/v10";
2
+ import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
3
+ export class ChannelSelectMenuInteraction extends AnySelectMenuInteraction {
4
+ constructor(client, data) {
5
+ super(client, data);
6
+ if (data.data.component_type !== ComponentType.ChannelSelect) {
7
+ throw new Error("Invalid component type was used to create this class");
8
+ }
9
+ }
10
+ }
11
+ //# sourceMappingURL=ChannelSelectMenuInteraction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChannelSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/abstracts/ChannelSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,MAAM,OAAO,4BAA6B,SAAQ,wBAAwB;IACzE,YAAY,MAAc,EAAE,IAA8C;QACzE,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnB,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,aAAa,EAAE,CAAC;YAC9D,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;CACD"}
@@ -0,0 +1,6 @@
1
+ import { type APIApplicationCommandInteraction } from "discord-api-types/v10";
2
+ import { Base } from "./Base.js";
3
+ export declare class CommandHandler extends Base {
4
+ handleInteraction(rawInteraction: APIApplicationCommandInteraction): Promise<false | void>;
5
+ }
6
+ //# sourceMappingURL=CommandHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandHandler.d.ts","sourceRoot":"","sources":["../../../src/abstracts/CommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gCAAgC,EAKrC,MAAM,uBAAuB,CAAA;AAI9B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,qBAAa,cAAe,SAAQ,IAAI;IACjC,iBAAiB,CAAC,cAAc,EAAE,gCAAgC;CAoFxE"}