commandkit 1.2.0-rc.12 → 1.2.0-rc.13

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 (343) hide show
  1. package/{COPYING.md → LICENSE.md} +3 -3
  2. package/README.md +3 -3
  3. package/bin/index.mjs +1 -1
  4. package/cli.d.ts +19 -0
  5. package/config.cjs +3 -0
  6. package/config.d.ts +1 -0
  7. package/dist/{ActionRow-B-7n9MMr.d.ts → ActionRow-B-CGmjDp.d.ts} +3 -4
  8. package/dist/{ActionRow-uJxU4UGo.js → ActionRow-CSN_UKmM.js} +2 -3
  9. package/dist/{ActionRow-uJxU4UGo.js.map → ActionRow-CSN_UKmM.js.map} +1 -1
  10. package/dist/{Button-RMp-w8HV.d.ts → Button-C-GPeFA3.d.ts} +6 -7
  11. package/dist/{ButtonKit-9k4yfhYD.d.ts → ButtonKit-DKu0VAe4.d.ts} +36 -37
  12. package/dist/ChannelSelectMenuKit-HQZ4hH5s.d.ts +66 -0
  13. package/dist/{CommandKitEventsChannel-2l9Za-le.js → CommandKitEventsChannel-CnT5ymYe.js} +2 -2
  14. package/dist/{CommandKitEventsChannel-2l9Za-le.js.map → CommandKitEventsChannel-CnT5ymYe.js.map} +1 -1
  15. package/dist/{CommandsRouter-CBdsqaWK.d.ts → CommandsRouter-C7dZEepB.d.ts} +49 -50
  16. package/dist/{CommandsRouter-CWMipIis.js → CommandsRouter-C_HLsrGX.js} +2 -6
  17. package/dist/{CommandsRouter-CWMipIis.js.map → CommandsRouter-C_HLsrGX.js.map} +1 -1
  18. package/dist/{CompilerPlugin-CZ4412Zm.js → CompilerPlugin-CUsGAfgl.js} +2 -2
  19. package/dist/{CompilerPlugin-CZ4412Zm.js.map → CompilerPlugin-CUsGAfgl.js.map} +1 -1
  20. package/dist/EventInterceptor-BWoEJMHZ.js.map +1 -1
  21. package/dist/{EventInterceptor-x-R2qshQ.d.ts → EventInterceptor-CZmWpS08.d.ts} +40 -40
  22. package/dist/{EventWorkerContext-D_9q1Bm2.js → EventWorkerContext-Dfhgv329.js} +2 -3
  23. package/dist/{EventWorkerContext-D_9q1Bm2.js.map → EventWorkerContext-Dfhgv329.js.map} +1 -1
  24. package/dist/EventsRouter-DZ37r54v.d.ts +90 -0
  25. package/dist/{EventsRouter-C04XqRKf.js → EventsRouter-DZYIha6m.js} +2 -6
  26. package/dist/{EventsRouter-C04XqRKf.js.map → EventsRouter-DZYIha6m.js.map} +1 -1
  27. package/dist/MentionableSelectMenuKit-7URDUM3-.d.ts +61 -0
  28. package/dist/{MessageCommandParser-CKh-tM97.js → MessageCommandParser-Bs9fimmd.js} +2 -3
  29. package/dist/{MessageCommandParser-CKh-tM97.js.map → MessageCommandParser-Bs9fimmd.js.map} +1 -1
  30. package/dist/MessageCommandParser-q3dQcE5N.d.ts +194 -0
  31. package/dist/{Modal-Calb46SJ.d.ts → Modal-CZT9MZsy.d.ts} +20 -10
  32. package/dist/{ModalKit-Cq2ns6jv.d.ts → ModalKit-BWXI3Z26.d.ts} +33 -34
  33. package/dist/{PluginCommon-CPWV5xuX.js → PluginCommon-BLxWww5u.js} +6 -7
  34. package/dist/{PluginCommon-CPWV5xuX.js.map → PluginCommon-BLxWww5u.js.map} +1 -1
  35. package/dist/RoleSelectMenuKit-BY-JJ18w.d.ts +66 -0
  36. package/dist/{RuntimePlugin-COeXe8rP.js → RuntimePlugin-CtobluSU.js} +2 -2
  37. package/dist/{RuntimePlugin-COeXe8rP.js.map → RuntimePlugin-CtobluSU.js.map} +1 -1
  38. package/dist/{SelectMenu-VcDhOGoJ.d.ts → SelectMenu-q_b3Mjv9.d.ts} +9 -10
  39. package/dist/StringSelectMenuKit-lVhUMc3g.d.ts +66 -0
  40. package/dist/UserSelectMenuKit-CCj4Fpkr.d.ts +66 -0
  41. package/dist/analytics/analytics-engine.d.ts +1 -33
  42. package/dist/analytics/analytics-engine.js +22 -37
  43. package/dist/analytics/analytics-provider.d.ts +1 -33
  44. package/dist/analytics/constants.js +1 -1
  45. package/dist/analytics/utils.js +22 -37
  46. package/dist/{analytics-engine-NOInIjv8.d.ts → analytics-engine-WQhXmx3H.d.ts} +844 -841
  47. package/dist/app/commands/AppCommandRunner.d.ts +1 -33
  48. package/dist/app/commands/AppCommandRunner.js +22 -37
  49. package/dist/app/commands/Context.d.ts +1 -33
  50. package/dist/app/commands/Context.js +22 -37
  51. package/dist/app/commands/MessageCommandParser.d.ts +1 -1
  52. package/dist/app/commands/MessageCommandParser.js +1 -2
  53. package/dist/app/commands/helpers.d.ts +1 -1
  54. package/dist/app/commands/helpers.js +1 -1
  55. package/dist/app/events/EventWorkerContext.d.ts +42 -35
  56. package/dist/app/events/EventWorkerContext.js +1 -1
  57. package/dist/app/handlers/AppCommandHandler.d.ts +1 -33
  58. package/dist/app/handlers/AppCommandHandler.js +22 -37
  59. package/dist/app/handlers/AppEventsHandler.d.ts +1 -33
  60. package/dist/app/handlers/AppEventsHandler.js +22 -37
  61. package/dist/app/index.d.ts +4 -33
  62. package/dist/app/index.js +22 -38
  63. package/dist/app/interrupt/signals.d.ts +1 -1
  64. package/dist/app/interrupt/signals.js +2 -3
  65. package/dist/app/middlewares/permissions.d.ts +1 -33
  66. package/dist/app/middlewares/permissions.js +22 -37
  67. package/dist/app/register/CommandRegistrar.d.ts +1 -33
  68. package/dist/app/register/CommandRegistrar.js +22 -37
  69. package/dist/app/router/CommandsRouter.d.ts +1 -1
  70. package/dist/app/router/CommandsRouter.js +1 -1
  71. package/dist/app/router/EventsRouter.d.ts +1 -1
  72. package/dist/app/router/EventsRouter.js +1 -1
  73. package/dist/app/router/index.d.ts +2 -3
  74. package/dist/app/router/index.js +2 -2
  75. package/dist/{chunk-nOFOJqeH.js → chunk-kSYXY2_d.js} +10 -6
  76. package/dist/cli/app-process.d.ts +0 -1
  77. package/dist/cli/app-process.js +62 -7
  78. package/dist/cli/app-process.js.map +1 -0
  79. package/dist/cli/build.d.ts +2 -33
  80. package/dist/cli/build.js +189 -42
  81. package/dist/cli/build.js.map +1 -0
  82. package/dist/cli/common.d.ts +1 -33
  83. package/dist/cli/common.js +4 -4
  84. package/dist/cli/development.d.ts +18 -1
  85. package/dist/cli/development.js +41 -49
  86. package/dist/cli/development.js.map +1 -1
  87. package/dist/cli/env.d.ts +4 -0
  88. package/dist/cli/env.js +1 -1
  89. package/dist/cli/generators.js +5 -8
  90. package/dist/cli/generators.js.map +1 -1
  91. package/dist/cli/information.js +5 -5
  92. package/dist/cli/information.js.map +1 -1
  93. package/dist/cli/init.d.ts +12 -2
  94. package/dist/cli/init.js +100 -39
  95. package/dist/cli/init.js.map +1 -0
  96. package/dist/cli/production.d.ts +0 -1
  97. package/dist/cli/production.js +36 -49
  98. package/dist/cli/production.js.map +1 -1
  99. package/dist/cli/type-checker.js +5 -5
  100. package/dist/cli/utils.d.ts +0 -1
  101. package/dist/cli/utils.js +17 -2
  102. package/dist/cli/utils.js.map +1 -0
  103. package/dist/{colors-DL3ucTiT.js → colors-Csc0X4QJ.js} +2 -3
  104. package/dist/{colors-DL3ucTiT.js.map → colors-Csc0X4QJ.js.map} +1 -1
  105. package/dist/{commandkit-DabqpQ6v.js → commandkit-SIjTLD2R.js} +145 -46
  106. package/dist/commandkit-SIjTLD2R.js.map +1 -0
  107. package/dist/commandkit.d.ts +1 -33
  108. package/dist/commandkit.js +22 -37
  109. package/dist/{common-CCx-FJI4.js → common-CEordwf3.js} +1 -1
  110. package/dist/{common-CCx-FJI4.js.map → common-CEordwf3.js.map} +1 -1
  111. package/dist/{common-fIO6fqGZ.js → common-DSRs_mfw.js} +9 -12
  112. package/dist/{common-fIO6fqGZ.js.map → common-DSRs_mfw.js.map} +1 -1
  113. package/dist/{common-DHTTnX82.d.ts → common-DnwCYit8.d.ts} +3 -4
  114. package/dist/components/common/EventInterceptor.d.ts +1 -1
  115. package/dist/components/common/element.d.ts +1 -4
  116. package/dist/components/common/types.d.ts +1 -1
  117. package/dist/components/common/types.js +0 -1
  118. package/dist/components/display/common.d.ts +0 -1
  119. package/dist/components/display/common.js +1 -1
  120. package/dist/components/display/container.d.ts +1 -1
  121. package/dist/components/display/container.js +1 -2
  122. package/dist/components/display/file.d.ts +1 -1
  123. package/dist/components/display/file.js +1 -1
  124. package/dist/components/display/index.d.ts +8 -9
  125. package/dist/components/display/index.js +8 -9
  126. package/dist/components/display/label.d.ts +1 -1
  127. package/dist/components/display/label.js +1 -2
  128. package/dist/components/display/media-gallery.d.ts +1 -1
  129. package/dist/components/display/media-gallery.js +1 -2
  130. package/dist/components/display/poll.d.ts +1 -1
  131. package/dist/components/display/poll.js +1 -1
  132. package/dist/components/display/section.d.ts +1 -1
  133. package/dist/components/display/section.js +1 -2
  134. package/dist/components/display/separator.d.ts +1 -1
  135. package/dist/components/display/separator.js +1 -1
  136. package/dist/components/display/text-display.d.ts +1 -1
  137. package/dist/components/display/text-display.js +1 -1
  138. package/dist/components/index.d.ts +23 -26
  139. package/dist/components/index.js +23 -36
  140. package/dist/components/interactive/action-row/ActionRow.d.ts +1 -5
  141. package/dist/components/interactive/action-row/ActionRow.js +1 -1
  142. package/dist/components/interactive/button/Button.d.ts +1 -6
  143. package/dist/components/interactive/button/Button.js +22 -37
  144. package/dist/components/interactive/button/ButtonKit.d.ts +1 -2
  145. package/dist/components/interactive/button/ButtonKit.js +22 -37
  146. package/dist/components/interactive/modal/Modal.d.ts +2 -7
  147. package/dist/components/interactive/modal/Modal.js +23 -37
  148. package/dist/components/interactive/modal/ModalKit.d.ts +1 -2
  149. package/dist/components/interactive/modal/ModalKit.js +22 -37
  150. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +1 -3
  151. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +22 -37
  152. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +1 -3
  153. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +22 -37
  154. package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +1 -3
  155. package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +22 -37
  156. package/dist/components/interactive/select-menu/SelectMenu.d.ts +1 -9
  157. package/dist/components/interactive/select-menu/SelectMenu.js +22 -37
  158. package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +1 -3
  159. package/dist/components/interactive/select-menu/StringSelectMenuKit.js +22 -37
  160. package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +1 -3
  161. package/dist/components/interactive/select-menu/UserSelectMenuKit.js +22 -37
  162. package/dist/components/interactive/select-menu/common.d.ts +1 -2
  163. package/dist/components/interactive/select-menu/common.js +0 -1
  164. package/dist/config/config.d.ts +15 -35
  165. package/dist/config/config.js +22 -37
  166. package/dist/config/default.d.ts +1 -33
  167. package/dist/config/default.js +22 -37
  168. package/dist/config/loader.d.ts +1 -33
  169. package/dist/config/loader.js +22 -37
  170. package/dist/config/types.d.ts +1 -33
  171. package/dist/config/utils.d.ts +1 -33
  172. package/dist/constants-BFFK-hfP.js +27 -0
  173. package/dist/{constants-AH-9qJ89.js.map → constants-BFFK-hfP.js.map} +1 -1
  174. package/dist/{constants-DqnSDZ6l.d.ts → constants-CuYW0K10.d.ts} +14 -8
  175. package/dist/{constants-D0dawKxO.js → constants-Cw8VjCVz.js} +2 -3
  176. package/dist/{constants-D0dawKxO.js.map → constants-Cw8VjCVz.js.map} +1 -1
  177. package/dist/{constants-BMWH2YUr.js → constants-CxkFFZ7p.js} +16 -1
  178. package/dist/constants-CxkFFZ7p.js.map +1 -0
  179. package/dist/{constants-CCFSX2NG.d.ts → constants-EpKcj0dH.d.ts} +2 -2
  180. package/dist/{container-DC0eQigs.js → container-DCPljKVH.js} +3 -4
  181. package/dist/{container-DC0eQigs.js.map → container-DCPljKVH.js.map} +1 -1
  182. package/dist/{container-1ltvkavy.d.ts → container-DYcb7zGw.d.ts} +2 -3
  183. package/dist/context/async-context.d.ts +1 -33
  184. package/dist/context/async-context.js +22 -37
  185. package/dist/context/environment.d.ts +1 -33
  186. package/dist/context/environment.js +22 -37
  187. package/dist/element-DibzzA5L.js.map +1 -1
  188. package/dist/{element-CvNhvLZ8.d.ts → element-wQo0heGj.d.ts} +4 -5
  189. package/dist/{env-8yY-6pbC.js → env-CmspDhHy.js} +7 -3
  190. package/dist/env-CmspDhHy.js.map +1 -0
  191. package/dist/error-codes-Ds0bnPvT.js.map +1 -1
  192. package/dist/events/CommandKitEventsChannel.d.ts +1 -33
  193. package/dist/events/CommandKitEventsChannel.js +1 -1
  194. package/dist/{file-DAUOZYhC.js → file-Ca1kpEtE.js} +2 -3
  195. package/dist/{file-DAUOZYhC.js.map → file-Ca1kpEtE.js.map} +1 -1
  196. package/dist/{file-n2yl_-vl.d.ts → file-CrV4lSnl.d.ts} +2 -3
  197. package/dist/flags/FlagProvider.d.ts +1 -33
  198. package/dist/flags/feature-flags.d.ts +1 -33
  199. package/dist/flags/feature-flags.js +163 -41
  200. package/dist/flags/feature-flags.js.map +1 -0
  201. package/dist/flags/store.d.ts +1 -33
  202. package/dist/flags/store.js +1 -1
  203. package/dist/{helpers-hDh_tMb6.d.ts → helpers-AQPLVY35.d.ts} +2 -3
  204. package/dist/{helpers-D2_1jih6.js → helpers-Btx1FSZx.js} +2 -3
  205. package/dist/{helpers-D2_1jih6.js.map → helpers-Btx1FSZx.js.map} +1 -1
  206. package/dist/index.d.ts +41 -44
  207. package/dist/index.js +39 -45
  208. package/dist/index.js.map +1 -1
  209. package/dist/kv/constants.d.ts +1 -1
  210. package/dist/kv/constants.js +1 -1
  211. package/dist/kv/dotprops.js +25 -3
  212. package/dist/kv/dotprops.js.map +1 -0
  213. package/dist/kv/kv.d.ts +289 -290
  214. package/dist/kv/kv.js +14 -16
  215. package/dist/kv/kv.js.map +1 -1
  216. package/dist/kv/serde.d.ts +12 -3
  217. package/dist/kv/serde.js +86 -4
  218. package/dist/kv/serde.js.map +1 -0
  219. package/dist/{label-D0KXeBhk.d.ts → label-37kaNWMH.d.ts} +4 -5
  220. package/dist/{label-D-uJWRZ0.js → label-B6vXvwLM.js} +4 -5
  221. package/dist/{label-D-uJWRZ0.js.map → label-B6vXvwLM.js.map} +1 -1
  222. package/dist/logger/DefaultLogger.d.ts +66 -3
  223. package/dist/logger/DefaultLogger.js +22 -37
  224. package/dist/logger/ILogger.d.ts +64 -2
  225. package/dist/logger/ILogger.js +0 -1
  226. package/dist/logger/Logger.d.ts +36 -3
  227. package/dist/logger/Logger.js +22 -37
  228. package/dist/logger/NoopLogger.d.ts +36 -37
  229. package/dist/{media-gallery-BzG70ued.d.ts → media-gallery-Ci3I4ElH.d.ts} +2 -3
  230. package/dist/{media-gallery-BLhwe5lO.js → media-gallery-u3gjX7yD.js} +3 -4
  231. package/dist/{media-gallery-BLhwe5lO.js.map → media-gallery-u3gjX7yD.js.map} +1 -1
  232. package/dist/plugins/CompilerPlugin.d.ts +1 -33
  233. package/dist/plugins/CompilerPlugin.js +1 -2
  234. package/dist/plugins/PluginCommon.d.ts +1 -33
  235. package/dist/plugins/PluginCommon.js +1 -1
  236. package/dist/plugins/RuntimePlugin.d.ts +1 -33
  237. package/dist/plugins/RuntimePlugin.js +1 -2
  238. package/dist/plugins/index.d.ts +1 -33
  239. package/dist/plugins/index.js +24 -37
  240. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -33
  241. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +22 -37
  242. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -33
  243. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +22 -37
  244. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -33
  245. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +22 -37
  246. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -33
  247. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +22 -37
  248. package/dist/plugins/plugin-runtime/runtime.d.ts +1 -33
  249. package/dist/plugins/plugin-runtime/runtime.js +0 -1
  250. package/dist/plugins/types.d.ts +1 -33
  251. package/dist/plugins/types.js +0 -1
  252. package/dist/{poll-Bc6rjeUS.js → poll-CFe8yvoJ.js} +12 -13
  253. package/dist/{poll-Bc6rjeUS.js.map → poll-CFe8yvoJ.js.map} +1 -1
  254. package/dist/{poll-HnaJcB0o.d.ts → poll-Ddtapd6n.d.ts} +8 -9
  255. package/dist/{resolve-file-url-CJoD0FAn.js → resolve-file-url-CdHqwWs3.js} +2 -2
  256. package/dist/{resolve-file-url-CJoD0FAn.js.map → resolve-file-url-CdHqwWs3.js.map} +1 -1
  257. package/dist/{section-BMcHN97i.js → section-BC8LF-B2.js} +3 -4
  258. package/dist/{section-BMcHN97i.js.map → section-BC8LF-B2.js.map} +1 -1
  259. package/dist/{section-BOaJKXiy.d.ts → section-DkUKULnB.d.ts} +2 -3
  260. package/dist/{separator-C___2K-f.js → separator-BUTiW7uz.js} +2 -3
  261. package/dist/{separator-C___2K-f.js.map → separator-BUTiW7uz.js.map} +1 -1
  262. package/dist/{separator-Cb7-6T6N.d.ts → separator-CbXsIFCa.d.ts} +2 -3
  263. package/dist/{signals-Cnqe9dFV.js → signals-B8z1wJ6W.js} +2 -2
  264. package/dist/{signals-Cnqe9dFV.js.map → signals-B8z1wJ6W.js.map} +1 -1
  265. package/dist/{signals-DBS60vTo.d.ts → signals-BbTgTc0i.d.ts} +2 -2
  266. package/dist/{store-ZwL2gN6a.js → store-D8r_hryO.js} +2 -3
  267. package/dist/{store-ZwL2gN6a.js.map → store-D8r_hryO.js.map} +1 -1
  268. package/dist/{text-display-B_hpz50P.d.ts → text-display-D7j39VC-.d.ts} +2 -3
  269. package/dist/{text-display-BtQR88kY.js → text-display-DANahMN3.js} +2 -3
  270. package/dist/{text-display-BtQR88kY.js.map → text-display-DANahMN3.js.map} +1 -1
  271. package/dist/{type-checker-CEFHoQoV.js → type-checker-cVd3Hpnh.js} +4 -6
  272. package/dist/{type-checker-CEFHoQoV.js.map → type-checker-cVd3Hpnh.js.map} +1 -1
  273. package/dist/{types-CJ-XvOFN.d.ts → types-BywA9d2Z.d.ts} +2 -2
  274. package/dist/{types-package-D11rQXLs.js → types-package-CsTNfvv2.js} +3 -6
  275. package/dist/{types-package-D11rQXLs.js.map → types-package-CsTNfvv2.js.map} +1 -1
  276. package/dist/types.d.ts +1 -33
  277. package/dist/utils/colors.js +1 -1
  278. package/dist/utils/constants.d.ts +2 -2
  279. package/dist/utils/constants.js +3 -2
  280. package/dist/utils/dev-hooks.d.ts +1 -33
  281. package/dist/utils/dev-hooks.js +22 -37
  282. package/dist/utils/error-codes.d.ts +54 -2
  283. package/dist/utils/resolve-file-url.d.ts +11 -2
  284. package/dist/utils/resolve-file-url.js +1 -1
  285. package/dist/utils/types-package.js +2 -2
  286. package/dist/utils/useful-stuff/async-queue.d.ts +21 -21
  287. package/dist/utils/useful-stuff/mutex.d.ts +62 -62
  288. package/dist/utils/useful-stuff/ratelimiter.d.ts +56 -56
  289. package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
  290. package/dist/utils/useful-stuff/semaphore.d.ts +82 -82
  291. package/dist/utils/utilities.d.ts +113 -2
  292. package/dist/utils/utilities.js +25 -38
  293. package/dist/utils-Br3eenD1.js.map +1 -1
  294. package/dist/version.d.ts +8 -2
  295. package/dist/version.js +12 -2
  296. package/dist/version.js.map +1 -0
  297. package/dist/warning-CszH8HeS.js.map +1 -1
  298. package/hooks.cjs +11 -4
  299. package/package.json +14 -7
  300. package/dist/ChannelSelectMenuKit-CsYgIyKe.d.ts +0 -67
  301. package/dist/DefaultLogger-CHMVsizQ.d.ts +0 -67
  302. package/dist/EventWorkerContext-CLhZRHhH.d.ts +0 -43
  303. package/dist/EventsRouter-4pT6vj-U.d.ts +0 -90
  304. package/dist/ILogger-BQ2ew4zR.d.ts +0 -64
  305. package/dist/Logger-DyV7oli4.d.ts +0 -37
  306. package/dist/MentionableSelectMenuKit-CO9phWMf.d.ts +0 -62
  307. package/dist/MessageCommandParser-DEOl_ifb.d.ts +0 -195
  308. package/dist/RoleSelectMenuKit-DvBxzpWh.d.ts +0 -67
  309. package/dist/StringSelectMenuKit-CJ0MzUZJ.d.ts +0 -67
  310. package/dist/UserSelectMenuKit-C_J-9RJs.d.ts +0 -67
  311. package/dist/app-CrjK9yWX.js +0 -0
  312. package/dist/app-process-AQ3Cbf6j.js +0 -68
  313. package/dist/app-process-AQ3Cbf6j.js.map +0 -1
  314. package/dist/build-BYMHMOl_.js +0 -173
  315. package/dist/build-BYMHMOl_.js.map +0 -1
  316. package/dist/commandkit-DabqpQ6v.js.map +0 -1
  317. package/dist/common-0Iw8ZeM6.js +0 -0
  318. package/dist/config-DbgXt6mf.d.ts +0 -16
  319. package/dist/constants-AH-9qJ89.js +0 -27
  320. package/dist/constants-BMWH2YUr.js.map +0 -1
  321. package/dist/dotprops-DvJUE8fw.js +0 -36
  322. package/dist/dotprops-DvJUE8fw.js.map +0 -1
  323. package/dist/env-8yY-6pbC.js.map +0 -1
  324. package/dist/error-codes-BiNRVMiV.d.ts +0 -54
  325. package/dist/feature-flags-BoBV4Dsj.js +0 -160
  326. package/dist/feature-flags-BoBV4Dsj.js.map +0 -1
  327. package/dist/init-CBb0StSB.js +0 -91
  328. package/dist/init-CBb0StSB.js.map +0 -1
  329. package/dist/init-DSYckXwx.d.ts +0 -13
  330. package/dist/resolve-file-url-DFtR8jRR.d.ts +0 -11
  331. package/dist/serde-D4H23l2F.d.ts +0 -12
  332. package/dist/serde-DHHwhltz.js +0 -97
  333. package/dist/serde-DHHwhltz.js.map +0 -1
  334. package/dist/utilities-CQUaua43.d.ts +0 -87
  335. package/dist/utils-Bf-3Eevb.js +0 -23
  336. package/dist/utils-Bf-3Eevb.js.map +0 -1
  337. package/dist/version-DC4j2ZwU.js +0 -18
  338. package/dist/version-DC4j2ZwU.js.map +0 -1
  339. package/dist/version-DggMfP_1.d.ts +0 -8
  340. /package/dist/{ILogger-B0q7p7L1.js → common-C2jAjX4U.js} +0 -0
  341. /package/dist/{index-B5F3AfVc.d.ts → index-BJfko-dP.d.ts} +0 -0
  342. /package/dist/{index-BLwMeReG.d.ts → index-CCggO_hw.d.ts} +0 -0
  343. /package/dist/{index-h64gcVNJ.d.ts → index-CLjpoGi1.d.ts} +0 -0
@@ -0,0 +1,194 @@
1
+ import { ApplicationCommandOptionType, Attachment, CommandInteractionOption, GuildMember, Message, Role, User } from "discord.js";
2
+ import { Channel } from "diagnostics_channel";
3
+
4
+ //#region src/app/commands/MessageCommandParser.d.ts
5
+ /**
6
+ * Represents a parsed message command with its components.
7
+ */
8
+ interface ParsedMessageCommand {
9
+ command: string;
10
+ options: {
11
+ name: string;
12
+ value: unknown;
13
+ }[];
14
+ subcommand?: string;
15
+ subcommandGroup?: string;
16
+ }
17
+ /**
18
+ * Schema defining the types of options for a message command.
19
+ */
20
+ type MessageCommandOptionsSchema = Record<string, ApplicationCommandOptionType>;
21
+ /**
22
+ * Parses message content into structured command data with options and subcommands.
23
+ */
24
+ declare class MessageCommandParser {
25
+ #private;
26
+ message: Message;
27
+ private prefix;
28
+ private schema;
29
+ /**
30
+ * Creates a new message command parser.
31
+ * @param message - The Discord message to parse
32
+ * @param prefix - Array of valid command prefixes or a regular expression
33
+ * @param schema - Function that returns the options schema for a command
34
+ */
35
+ constructor(message: Message, prefix: string[] | RegExp, schema: (command: string) => MessageCommandOptionsSchema);
36
+ /**
37
+ * Gets the parsed command arguments.
38
+ * @returns Array of command arguments
39
+ */
40
+ getArgs(): string[];
41
+ /**
42
+ * Gets the message command options object for easy access to typed option values.
43
+ */
44
+ get options(): MessageCommandOptions;
45
+ /**
46
+ * Gets a specific option value by name.
47
+ * @param name - The option name
48
+ * @returns The option value or undefined if not found
49
+ */
50
+ getOption<T>(name: string): T | undefined;
51
+ /**
52
+ * Gets the main command name.
53
+ * @returns The command name
54
+ */
55
+ getCommand(): string;
56
+ /**
57
+ * Gets the subcommand name if present.
58
+ * @returns The subcommand name or undefined
59
+ */
60
+ getSubcommand(): string | undefined;
61
+ /**
62
+ * Gets the subcommand group name if present.
63
+ * @returns The subcommand group name or undefined
64
+ */
65
+ getSubcommandGroup(): string | undefined;
66
+ /**
67
+ * Gets the prefix used in the message.
68
+ * @returns The matched prefix or undefined
69
+ */
70
+ getPrefix(): string | undefined;
71
+ /**
72
+ * Gets the full command including subcommand group and subcommand.
73
+ * @returns The complete command string
74
+ */
75
+ getFullCommand(): string;
76
+ /**
77
+ * Parses the message content into structured command data.
78
+ * @returns The parsed command data
79
+ */
80
+ parse(): ParsedMessageCommand;
81
+ }
82
+ /**
83
+ * Provides typed access to message command options with methods similar to Discord.js interaction options.
84
+ */
85
+ declare class MessageCommandOptions {
86
+ private parser;
87
+ /**
88
+ * Creates a new message command options instance.
89
+ * @param parser - The message command parser instance
90
+ */
91
+ constructor(parser: MessageCommandParser);
92
+ /**
93
+ * @private
94
+ * @internal
95
+ */
96
+ private assertOption;
97
+ /**
98
+ * Gets a guild member from the command options.
99
+ * @param name - The option name
100
+ * @param required - Whether the option is required
101
+ * @returns The guild member or null if not found
102
+ */
103
+ getMember(name: string): GuildMember | null;
104
+ getMember(name: string, required: true): GuildMember;
105
+ /**
106
+ * Gets an attachment from the command options.
107
+ * @param name - The option name
108
+ * @param required - Whether the option is required
109
+ * @returns The attachment or null if not found
110
+ */
111
+ getAttachment(name: string): Attachment | null;
112
+ getAttachment(name: string, required: true): Attachment;
113
+ /**
114
+ * Gets a boolean value from the command options.
115
+ * @param name - The option name
116
+ * @param required - Whether the option is required
117
+ * @returns The boolean value or null if not found
118
+ */
119
+ getBoolean(name: string): boolean | null;
120
+ getBoolean(name: string, required: true): boolean;
121
+ /**
122
+ * Gets a number value from the command options.
123
+ * @param name - The option name
124
+ * @param required - Whether the option is required
125
+ * @returns The number value or null if not found
126
+ */
127
+ getNumber(name: string): number | null;
128
+ getNumber(name: string, required: true): number;
129
+ /**
130
+ * Gets a string value from the command options.
131
+ * @param name - The option name
132
+ * @param required - Whether the option is required
133
+ * @returns The string value or null if not found
134
+ */
135
+ getString(name: string): string | null;
136
+ getString(name: string, required: true): string;
137
+ /**
138
+ * Gets an integer value from the command options.
139
+ * @param name - The option name
140
+ * @param required - Whether the option is required
141
+ * @returns The integer value or null if not found
142
+ */
143
+ getInteger(name: string): number | null;
144
+ getInteger(name: string, required: true): number;
145
+ /**
146
+ * Gets a user from the command options.
147
+ * @param name - The option name
148
+ * @param required - Whether the option is required
149
+ * @returns The user or null if not found
150
+ */
151
+ getUser(name: string): User | null;
152
+ getUser(name: string, required: true): User;
153
+ /**
154
+ * Gets a channel from the command options.
155
+ * @param name - The option name
156
+ * @param required - Whether the option is required
157
+ * @returns The channel or null if not found
158
+ */
159
+ getChannel(name: string): Channel | null;
160
+ getChannel(name: string, required: true): Channel;
161
+ /**
162
+ * Gets a role from the command options.
163
+ * @param name - The option name
164
+ * @param required - Whether the option is required
165
+ * @returns The role or null if not found
166
+ */
167
+ getRole(name: string): Role | null;
168
+ getRole(name: string, required: true): Role;
169
+ /**
170
+ * Gets a mentionable (user, member, or role) from the command options.
171
+ * @param name - The option name
172
+ * @param required - Whether the option is required
173
+ * @returns The mentionable or null if not found
174
+ */
175
+ getMentionable(name: string): NonNullable<CommandInteractionOption['member' | 'role' | 'user']> | null;
176
+ getMentionable(name: string, required: true): NonNullable<CommandInteractionOption['member' | 'role' | 'user']>;
177
+ /**
178
+ * Gets the subcommand name from the command.
179
+ * @param required - Whether the subcommand is required
180
+ * @returns The subcommand name or null if not found
181
+ */
182
+ getSubcommand(): string | null;
183
+ getSubcommand(required: true): string;
184
+ /**
185
+ * Gets the subcommand group name from the command.
186
+ * @param required - Whether the subcommand group is required
187
+ * @returns The subcommand group name or null if not found
188
+ */
189
+ getSubcommandGroup(): string | null;
190
+ getSubcommandGroup(required: true): string;
191
+ }
192
+ //#endregion
193
+ export { ParsedMessageCommand as i, MessageCommandOptionsSchema as n, MessageCommandParser as r, MessageCommandOptions as t };
194
+ //# sourceMappingURL=MessageCommandParser-q3dQcE5N.d.ts.map
@@ -1,11 +1,10 @@
1
- import { EventInterceptorErrorHandler } from "./EventInterceptor-x-R2qshQ.js";
2
- import { CommandKitModalBuilderInteractionCollectorDispatchContextData, ModalKit, OnModalKitEnd, OnModalKitSubmit } from "./ModalKit-Cq2ns6jv.js";
3
- import { CommandKitElement } from "./element-CvNhvLZ8.js";
4
- import { MaybeArray } from "./types-CJ-XvOFN.js";
5
- import { TextInputStyle } from "discord.js";
1
+ import { r as EventInterceptorErrorHandler } from "./EventInterceptor-CZmWpS08.js";
2
+ import { i as ModalKit, n as CommandKitModalBuilderInteractionCollectorDispatchContextData, o as OnModalKitEnd, s as OnModalKitSubmit } from "./ModalKit-BWXI3Z26.js";
3
+ import { n as CommandKitElement } from "./element-wQo0heGj.js";
4
+ import { t as MaybeArray } from "./types-BywA9d2Z.js";
5
+ import { FileUploadBuilder, FileUploadComponentData, TextInputStyle } from "discord.js";
6
6
 
7
7
  //#region src/components/interactive/modal/Modal.d.ts
8
-
9
8
  /**
10
9
  * The properties for the modal component.
11
10
  */
@@ -28,8 +27,8 @@ declare function Modal(props: ModalProps): CommandKitElement<'modal'>;
28
27
  interface TextInputProps {
29
28
  customId: string;
30
29
  /**
31
- * @deprecated use the `<Label />` component instead.
32
- */
30
+ * @deprecated use the `<Label />` component instead.
31
+ */
33
32
  label?: string;
34
33
  placeholder?: string;
35
34
  maxLength?: number;
@@ -60,6 +59,17 @@ declare function ShortInput(props: TextInputProps): CommandKitElement<'text-inpu
60
59
  * @example <ParagraphInput customId="input" label="Input" />
61
60
  */
62
61
  declare function ParagraphInput(props: TextInputProps): CommandKitElement<'text-input'>;
62
+ interface FileUploadProps extends Omit<FileUploadComponentData, 'type' | 'required'> {
63
+ id?: number;
64
+ required?: boolean;
65
+ }
66
+ /**
67
+ * The file upload component.
68
+ * @param props The file upload properties.
69
+ * @returns The commandkit element.
70
+ * @example <FileUpload customId="file" />
71
+ */
72
+ declare function FileUpload(props: FileUploadProps): FileUploadBuilder;
63
73
  //#endregion
64
- export { Modal, ModalProps, ParagraphInput, ShortInput, TextInput, TextInputProps };
65
- //# sourceMappingURL=Modal-Calb46SJ.d.ts.map
74
+ export { ParagraphInput as a, TextInputProps as c, ModalProps as i, FileUploadProps as n, ShortInput as o, Modal as r, TextInput as s, FileUpload as t };
75
+ //# sourceMappingURL=Modal-CZT9MZsy.d.ts.map
@@ -1,8 +1,7 @@
1
- import { EventInterceptorContextData, EventInterceptorErrorHandler } from "./EventInterceptor-x-R2qshQ.js";
1
+ import { n as EventInterceptorContextData, r as EventInterceptorErrorHandler } from "./EventInterceptor-CZmWpS08.js";
2
2
  import { Awaitable, Events, ModalBuilder, ModalSubmitInteraction } from "discord.js";
3
3
 
4
4
  //#region src/components/interactive/modal/ModalKit.d.ts
5
-
6
5
  /**
7
6
  * The predicate function that filters modal interactions.
8
7
  * It receives a ModalSubmitInteraction and returns a boolean or a Promise that resolves to a boolean.
@@ -41,47 +40,47 @@ type CommandKitModalBuilderInteractionCollectorDispatchContextData = EventInterc
41
40
  declare class ModalKit extends ModalBuilder {
42
41
  #private;
43
42
  /**
44
- * Sets the handler to run when the modal is submitted.
45
- * @param handler - The handler to run when the modal is submitted.
46
- * @param data - The context data for the interaction collector.
47
- * @returns This instance of the modal builder.
48
- * @example
49
- * ```ts
50
- * const modal = new ModalKit()
51
- * .setTitle('My Modal')
52
- * .setCustomId('my-modal')
53
- * .filter((interaction) => interaction.user.id === '1234567890')
54
- * .onSubmit(async (interaction) => {
55
- * await interaction.reply('You submitted the modal!');
56
- * })
57
- * .addComponents(actionRow1, actionRow2);
58
- * ```
59
- */
43
+ * Sets the handler to run when the modal is submitted.
44
+ * @param handler - The handler to run when the modal is submitted.
45
+ * @param data - The context data for the interaction collector.
46
+ * @returns This instance of the modal builder.
47
+ * @example
48
+ * ```ts
49
+ * const modal = new ModalKit()
50
+ * .setTitle('My Modal')
51
+ * .setCustomId('my-modal')
52
+ * .filter((interaction) => interaction.user.id === '1234567890')
53
+ * .onSubmit(async (interaction) => {
54
+ * await interaction.reply('You submitted the modal!');
55
+ * })
56
+ * .addComponents(actionRow1, actionRow2);
57
+ * ```
58
+ */
60
59
  onSubmit(handler: CommandKitModalBuilderInteractionCollectorDispatch, data?: CommandKitModalBuilderInteractionCollectorDispatchContextData): this;
61
60
  /**
62
- * Sets the handler to run when the interaction collector ends.
63
- * @param handler - The handler to run when the interaction collector ends.
64
- * @returns This instance of the modal builder.
65
- */
61
+ * Sets the handler to run when the interaction collector ends.
62
+ * @param handler - The handler to run when the interaction collector ends.
63
+ * @returns This instance of the modal builder.
64
+ */
66
65
  onEnd(handler: CommandKitModalBuilderOnEnd): this;
67
66
  /**
68
- * Sets the handler to run when the interaction collector ends.
69
- * @param handler - The handler to run when the interaction collector ends.
70
- * @returns This instance of the modal builder.
71
- */
67
+ * Sets the handler to run when the interaction collector ends.
68
+ * @param handler - The handler to run when the interaction collector ends.
69
+ * @returns This instance of the modal builder.
70
+ */
72
71
  onError(handler: EventInterceptorErrorHandler): this;
73
72
  /**
74
- * Sets a filter for the interaction collector.
75
- * @param predicate - The filter to use for the interaction collector.
76
- * @returns This instance of the modal builder.
77
- */
73
+ * Sets a filter for the interaction collector.
74
+ * @param predicate - The filter to use for the interaction collector.
75
+ * @returns This instance of the modal builder.
76
+ */
78
77
  filter(predicate: ModalKitPredicate): this;
79
78
  private get customId();
80
79
  /**
81
- * Disposes of the modal collector and cleans up resources.
82
- */
80
+ * Disposes of the modal collector and cleans up resources.
81
+ */
83
82
  dispose(): this;
84
83
  }
85
84
  //#endregion
86
- export { CommandKitModalBuilderInteractionCollectorDispatch, CommandKitModalBuilderInteractionCollectorDispatchContextData, CommandKitModalBuilderOnEnd, ModalKit, ModalKitPredicate, OnModalKitEnd, OnModalKitSubmit };
87
- //# sourceMappingURL=ModalKit-Cq2ns6jv.d.ts.map
85
+ export { ModalKitPredicate as a, ModalKit as i, CommandKitModalBuilderInteractionCollectorDispatchContextData as n, OnModalKitEnd as o, CommandKitModalBuilderOnEnd as r, OnModalKitSubmit as s, CommandKitModalBuilderInteractionCollectorDispatch as t };
86
+ //# sourceMappingURL=ModalKit-BWXI3Z26.d.ts.map
@@ -1,6 +1,5 @@
1
- const require_chunk = require('./chunk-nOFOJqeH.js');
1
+ const require_chunk = require('./chunk-kSYXY2_d.js');
2
2
  let node_crypto = require("node:crypto");
3
- node_crypto = require_chunk.__toESM(node_crypto);
4
3
 
5
4
  //#region src/plugins/PluginCommon.ts
6
5
  /**
@@ -8,10 +7,10 @@ node_crypto = require_chunk.__toESM(node_crypto);
8
7
  * - Compiler: A plugin that runs at compile time.
9
8
  * - Runtime: A plugin that runs at runtime.
10
9
  */
11
- let PluginType = /* @__PURE__ */ function(PluginType$1) {
12
- PluginType$1["Compiler"] = "compiler";
13
- PluginType$1["Runtime"] = "runtime";
14
- return PluginType$1;
10
+ let PluginType = /* @__PURE__ */ function(PluginType) {
11
+ PluginType["Compiler"] = "compiler";
12
+ PluginType["Runtime"] = "runtime";
13
+ return PluginType;
15
14
  }({});
16
15
  /**
17
16
  * Base class for CommandKit plugins.
@@ -68,4 +67,4 @@ Object.defineProperty(exports, 'isPlugin', {
68
67
  return isPlugin;
69
68
  }
70
69
  });
71
- //# sourceMappingURL=PluginCommon-CPWV5xuX.js.map
70
+ //# sourceMappingURL=PluginCommon-BLxWww5u.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PluginCommon-CPWV5xuX.js","names":[],"sources":["../src/plugins/PluginCommon.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto';\nimport { CommonPluginRuntime } from './plugin-runtime/runtime';\n\n/**\n * The options for a CommandKit plugin.\n */\nexport type PluginOptions = Record<string, any>;\n\n/**\n * Enum representing the type of plugin.\n * - Compiler: A plugin that runs at compile time.\n * - Runtime: A plugin that runs at runtime.\n */\nexport enum PluginType {\n Compiler = 'compiler',\n Runtime = 'runtime',\n}\n\n/**\n * Base class for CommandKit plugins.\n */\nexport abstract class PluginCommon<\n T extends PluginOptions = PluginOptions,\n C extends CommonPluginRuntime = CommonPluginRuntime,\n> {\n /**\n * The type of the plugin, either Compiler or Runtime.\n */\n public abstract readonly type: PluginType;\n /**\n * Unique identifier for the plugin instance.\n */\n public readonly id = randomUUID();\n /**\n * The time when the plugin was loaded, in milliseconds since the Unix epoch.\n */\n public readonly loadedAt = Date.now();\n /**\n * The name of the plugin.\n */\n public abstract readonly name: string;\n\n /**\n * Creates a new instance of the plugin.\n */\n public constructor(protected readonly options: T) {}\n\n /**\n * Called when this plugin is activated\n */\n public async activate(ctx: C): Promise<void> {}\n\n /**\n * Called when this plugin is deactivated\n */\n public async deactivate(ctx: C): Promise<void> {}\n}\n\n/**\n * Whether the given object is a CommandKit plugin.\n * @param plugin The object to check.\n * @returns Boolean indicating whether the object is a plugin.\n */\nexport function isPlugin(\n plugin: unknown,\n): plugin is PluginCommon<PluginOptions> {\n return plugin instanceof PluginCommon;\n}\n"],"mappings":";;;;;;;;;;AAaA,IAAY,oDAAL;AACL;AACA;;;;;;AAMF,IAAsB,eAAtB,MAGA;;;;CAQE,AAAgB,kCAAiB;;;;CAIjC,AAAgB,WAAW,KAAK,KAAK;;;;CASrC,AAAO,YAAY,AAAmB,SAAY;EAAZ;;;;;CAKtC,MAAa,SAAS,KAAuB;;;;CAK7C,MAAa,WAAW,KAAuB;;;;;;;AAQjD,SAAgB,SAChB,QACwC;AACtC,QAAO,kBAAkB"}
1
+ {"version":3,"file":"PluginCommon-BLxWww5u.js","names":[],"sources":["../src/plugins/PluginCommon.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto';\nimport { CommonPluginRuntime } from './plugin-runtime/runtime';\n\n/**\n * The options for a CommandKit plugin.\n */\nexport type PluginOptions = Record<string, any>;\n\n/**\n * Enum representing the type of plugin.\n * - Compiler: A plugin that runs at compile time.\n * - Runtime: A plugin that runs at runtime.\n */\nexport enum PluginType {\n Compiler = 'compiler',\n Runtime = 'runtime',\n}\n\n/**\n * Base class for CommandKit plugins.\n */\nexport abstract class PluginCommon<\n T extends PluginOptions = PluginOptions,\n C extends CommonPluginRuntime = CommonPluginRuntime,\n> {\n /**\n * The type of the plugin, either Compiler or Runtime.\n */\n public abstract readonly type: PluginType;\n /**\n * Unique identifier for the plugin instance.\n */\n public readonly id = randomUUID();\n /**\n * The time when the plugin was loaded, in milliseconds since the Unix epoch.\n */\n public readonly loadedAt = Date.now();\n /**\n * The name of the plugin.\n */\n public abstract readonly name: string;\n\n /**\n * Creates a new instance of the plugin.\n */\n public constructor(protected readonly options: T) {}\n\n /**\n * Called when this plugin is activated\n */\n public async activate(ctx: C): Promise<void> {}\n\n /**\n * Called when this plugin is deactivated\n */\n public async deactivate(ctx: C): Promise<void> {}\n}\n\n/**\n * Whether the given object is a CommandKit plugin.\n * @param plugin The object to check.\n * @returns Boolean indicating whether the object is a plugin.\n */\nexport function isPlugin(\n plugin: unknown,\n): plugin is PluginCommon<PluginOptions> {\n return plugin instanceof PluginCommon;\n}\n"],"mappings":";;;;;;;;;AAaA,IAAY,kDAAL;AACL;AACA;;;;;;AAMF,IAAsB,eAAtB,MAGA;;;;CAQE,AAAgB,kCAAiB;;;;CAIjC,AAAgB,WAAW,KAAK,KAAK;;;;CASrC,AAAO,YAAY,AAAmB,SAAY;EAAZ;;;;;CAKtC,MAAa,SAAS,KAAuB;;;;CAK7C,MAAa,WAAW,KAAuB;;;;;;;AAQjD,SAAgB,SAChB,QACwC;AACtC,QAAO,kBAAkB"}
@@ -0,0 +1,66 @@
1
+ import { r as EventInterceptorErrorHandler } from "./EventInterceptor-CZmWpS08.js";
2
+ import { a as OnSelectMenuKitSubmit, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-DnwCYit8.js";
3
+ import { RoleSelectMenuBuilder, RoleSelectMenuInteraction } from "discord.js";
4
+
5
+ //#region src/components/interactive/select-menu/RoleSelectMenuKit.d.ts
6
+ /**
7
+ * Type for the handler function that is called when the role select menu is submitted.
8
+ */
9
+ type OnRoleSelectMenuKitSubmit = OnSelectMenuKitSubmit<RoleSelectMenuInteraction, RoleSelectMenuKit>;
10
+ /**
11
+ * Type for the predicate function that filters role select menu interactions.
12
+ * It receives a RoleSelectMenuInteraction and returns a boolean or a Promise that resolves to a boolean.
13
+ */
14
+ type RoleSelectMenuKitPredicate = SelectMenuKitPredicate<RoleSelectMenuInteraction>;
15
+ /**
16
+ * A builder for creating role select menus with additional features like interaction collectors and event handling.
17
+ * This class extends the RoleSelectMenuBuilder from discord.js and adds methods for handling interactions.
18
+ * It allows you to set a handler for when the role select menu is submitted, filter interactions, and handle the end of the interaction collector.
19
+ */
20
+ declare class RoleSelectMenuKit extends RoleSelectMenuBuilder {
21
+ #private;
22
+ /**
23
+ * Sets the handler to run when the modal is submitted.
24
+ * @param handler - The handler to run when the modal is submitted.
25
+ * @param data - The context data for the interaction collector.
26
+ * @returns This instance of the modal builder.
27
+ * @example
28
+ * ```ts
29
+ * const modal = new RoleSelectMenuKit()
30
+ * .setTitle('My Modal')
31
+ * .setCustomId('my-modal')
32
+ * .filter((interaction) => interaction.Role.id === '1234567890')
33
+ * .onSelect(async (interaction) => {
34
+ * await interaction.reply('You submitted the modal!');
35
+ * })
36
+ * .addComponents(actionRow1, actionRow2);
37
+ * ```
38
+ */
39
+ onSelect(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch<RoleSelectMenuInteraction, RoleSelectMenuKit>, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData): this;
40
+ /**
41
+ * Sets the handler to run when the interaction collector ends.
42
+ * @param handler - The handler to run when the interaction collector ends.
43
+ * @returns This instance of the modal builder.
44
+ */
45
+ onEnd(handler: CommandKitSelectMenuBuilderOnEnd): this;
46
+ /**
47
+ * Sets the handler to run when the interaction collector ends.
48
+ * @param handler - The handler to run when the interaction collector ends.
49
+ * @returns This instance of the modal builder.
50
+ */
51
+ onError(handler: EventInterceptorErrorHandler): this;
52
+ /**
53
+ * Sets a filter for the interaction collector.
54
+ * @param predicate - The filter to use for the interaction collector.
55
+ * @returns This instance of the modal builder.
56
+ */
57
+ filter(predicate: SelectMenuKitPredicate<RoleSelectMenuInteraction>): this;
58
+ private get customId();
59
+ /**
60
+ * Disposes of the role select menu kit, cleaning up any resources and event listeners.
61
+ */
62
+ dispose(): this;
63
+ }
64
+ //#endregion
65
+ export { RoleSelectMenuKit as n, RoleSelectMenuKitPredicate as r, OnRoleSelectMenuKitSubmit as t };
66
+ //# sourceMappingURL=RoleSelectMenuKit-BY-JJ18w.d.ts.map
@@ -1,4 +1,4 @@
1
- const require_PluginCommon = require('./PluginCommon-CPWV5xuX.js');
1
+ const require_PluginCommon = require('./PluginCommon-BLxWww5u.js');
2
2
 
3
3
  //#region src/plugins/RuntimePlugin.ts
4
4
  /**
@@ -131,4 +131,4 @@ Object.defineProperty(exports, 'isRuntimePlugin', {
131
131
  return isRuntimePlugin;
132
132
  }
133
133
  });
134
- //# sourceMappingURL=RuntimePlugin-COeXe8rP.js.map
134
+ //# sourceMappingURL=RuntimePlugin-CtobluSU.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RuntimePlugin-COeXe8rP.js","names":[],"sources":["../src/plugins/RuntimePlugin.ts"],"sourcesContent":["import { Interaction, Message } from 'discord.js';\nimport {\n isPlugin,\n PluginCommon,\n PluginOptions,\n PluginType,\n} from './PluginCommon';\nimport type { CommandKitPluginRuntime } from './plugin-runtime/CommandKitPluginRuntime';\nimport { CommandBuilderLike, PreparedAppCommandExecution } from '../app';\nimport { CommandKitEnvironment } from '../context/environment';\nimport { CommandKitHMREvent } from '../utils/dev-hooks';\nimport { PreRegisterCommandsEvent } from '../app/register/CommandRegistrar';\nimport { CommandKitEventDispatch } from './types';\n\n/**\n * CommandKit plugin that runs at the runtime.\n */\nexport abstract class RuntimePlugin<\n T extends PluginOptions = PluginOptions,\n> extends PluginCommon<T, CommandKitPluginRuntime> {\n public readonly type = PluginType.Runtime;\n public readonly preload = new Set<string>();\n\n /**\n * Called before commands are loaded\n */\n public async onBeforeCommandsLoad(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called after commands are loaded\n */\n public async onAfterCommandsLoad(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called before events are loaded\n */\n public async onBeforeEventsLoad(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called after events are loaded\n */\n public async onAfterEventsLoad(ctx: CommandKitPluginRuntime): Promise<void> {}\n\n /**\n * Called before the client logs in\n */\n public async onBeforeClientLogin(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called after the client logs in\n */\n public async onAfterClientLogin(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called before interaction is handled\n * @param interaction The interaction\n */\n public async onBeforeInteraction(\n ctx: CommandKitPluginRuntime,\n interaction: Interaction,\n ): Promise<void> {}\n\n /**\n * Called before message command is processed\n * @param message The message\n */\n public async onBeforeMessageCommand(\n ctx: CommandKitPluginRuntime,\n message: Message,\n ): Promise<void> {}\n\n /**\n * Called before command is executed. This method can execute the command itself.\n * @param source The source that triggered the command\n * @param command The command\n * @param execute The function that executes the command\n */\n public async executeCommand(\n ctx: CommandKitPluginRuntime,\n env: CommandKitEnvironment,\n source: Interaction | Message,\n command: PreparedAppCommandExecution,\n execute: () => Promise<any>,\n ): Promise<boolean> {\n return false;\n }\n\n /**\n * Called after events router is initialized\n * @param ctx The context\n */\n public async onEventsRouterInit(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called after commands router is initialized\n * @param ctx The context\n */\n public async onCommandsRouterInit(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called when HMR event is received\n * @param ctx The context\n * @param event The event\n */\n public async performHMR(\n ctx: CommandKitPluginRuntime,\n event: CommandKitHMREvent,\n ): Promise<void> {}\n\n /**\n * Called before command is loaded for registration. This method can be used to modify the command data before it is loaded.\n * @param ctx The context\n * @param commands The command that is being loaded. This is a CommandBuilderLike object which represents Discord's command\n */\n async prepareCommand(\n ctx: CommandKitPluginRuntime,\n commands: CommandBuilderLike,\n ): Promise<CommandBuilderLike | null> {\n return null;\n }\n\n /**\n * Called before command is registered to discord. This method can cancel the registration of the command and handle it manually.\n * @param ctx The context\n * @param data The command registration data\n */\n async onBeforeRegisterCommands(\n ctx: CommandKitPluginRuntime,\n event: PreRegisterCommandsEvent,\n ): Promise<void> {}\n\n /**\n * Called before global commands registration. This method can cancel the registration of the command and handle it manually.\n * This method is called after `onBeforeRegisterCommands` if that stage was not handled.\n * @param ctx The context\n * @param event The command registration data\n */\n async onBeforeRegisterGlobalCommands(\n ctx: CommandKitPluginRuntime,\n event: PreRegisterCommandsEvent,\n ): Promise<void> {}\n\n /**\n * Called before guild commands registration. This method can cancel the registration of the command and handle it manually.\n * This method is called before guilds of the command are resolved. It is called after `onBeforeRegisterCommands` if that stage was not handled.\n * @param ctx The context\n * @param event The command registration data\n */\n async onBeforePrepareGuildCommandsRegistration(\n ctx: CommandKitPluginRuntime,\n event: PreRegisterCommandsEvent,\n ): Promise<void> {}\n\n /**\n * Called before guild commands registration. This method can cancel the registration of the command and handle it manually.\n * This method is called after guilds of the command are resolved. It is called after `onBeforePrepareGuildCommandsRegistration` if that stage was not handled.\n * @param ctx The context\n * @param event The command registration data\n */\n async onBeforeRegisterGuildCommands(\n ctx: CommandKitPluginRuntime,\n event: PreRegisterCommandsEvent,\n ): Promise<void> {}\n\n /**\n * Called after command and all of its deferred functions are executed.\n * @param ctx The context\n * @param env The environment of the command. This environment contains the command execution data such as command context and more.\n */\n async onAfterCommand(\n ctx: CommandKitPluginRuntime,\n env: CommandKitEnvironment,\n ) {}\n\n /**\n * Called before emitting an event\n * @param ctx The context\n * @param event The event that is being emitted\n */\n public async willEmitEvent(\n ctx: CommandKitPluginRuntime,\n event: CommandKitEventDispatch,\n ) {}\n}\n\nexport function isRuntimePlugin(plugin: unknown): plugin is RuntimePlugin {\n return (\n plugin instanceof RuntimePlugin ||\n (isPlugin(plugin) && plugin.type === PluginType.Runtime)\n );\n}\n"],"mappings":";;;;;;AAiBA,IAAsB,gBAAtB,cAEA,kCAAyC;CACvC,AAAgB,OAAO,gCAAW;CAClC,AAAgB,0BAAU,IAAI,KAAa;;;;CAK3C,MAAa,qBACb,KACgB;;;;CAKhB,MAAa,oBACb,KACgB;;;;CAKhB,MAAa,mBACb,KACgB;;;;CAKhB,MAAa,kBAAkB,KAA6C;;;;CAK5E,MAAa,oBACb,KACgB;;;;CAKhB,MAAa,mBACb,KACgB;;;;;CAMhB,MAAa,oBACb,KACA,aACgB;;;;;CAMhB,MAAa,uBACb,KACA,SACgB;;;;;;;CAQhB,MAAa,eACb,KACA,KACA,QACA,SACA,SACmB;AACjB,SAAO;;;;;;CAOT,MAAa,mBACb,KACgB;;;;;CAMhB,MAAa,qBACb,KACgB;;;;;;CAOhB,MAAa,WACb,KACA,OACgB;;;;;;CAOhB,MAAM,eACN,KACA,UACqC;AACnC,SAAO;;;;;;;CAQT,MAAM,yBACN,KACA,OACgB;;;;;;;CAQhB,MAAM,+BACN,KACA,OACgB;;;;;;;CAQhB,MAAM,yCACN,KACA,OACgB;;;;;;;CAQhB,MAAM,8BACN,KACA,OACgB;;;;;;CAOhB,MAAM,eACN,KACA,KACA;;;;;;CAOA,MAAa,cACb,KACA,OACA;;AAGF,SAAgB,gBAAgB,QAA0C;AACxE,QACE,kBAAkB,iBAClB,8BAAS,OAAO,IAAI,OAAO,SAAS,gCAAW"}
1
+ {"version":3,"file":"RuntimePlugin-CtobluSU.js","names":[],"sources":["../src/plugins/RuntimePlugin.ts"],"sourcesContent":["import { Interaction, Message } from 'discord.js';\nimport {\n isPlugin,\n PluginCommon,\n PluginOptions,\n PluginType,\n} from './PluginCommon';\nimport type { CommandKitPluginRuntime } from './plugin-runtime/CommandKitPluginRuntime';\nimport { CommandBuilderLike, PreparedAppCommandExecution } from '../app';\nimport { CommandKitEnvironment } from '../context/environment';\nimport { CommandKitHMREvent } from '../utils/dev-hooks';\nimport { PreRegisterCommandsEvent } from '../app/register/CommandRegistrar';\nimport { CommandKitEventDispatch } from './types';\n\n/**\n * CommandKit plugin that runs at the runtime.\n */\nexport abstract class RuntimePlugin<\n T extends PluginOptions = PluginOptions,\n> extends PluginCommon<T, CommandKitPluginRuntime> {\n public readonly type = PluginType.Runtime;\n public readonly preload = new Set<string>();\n\n /**\n * Called before commands are loaded\n */\n public async onBeforeCommandsLoad(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called after commands are loaded\n */\n public async onAfterCommandsLoad(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called before events are loaded\n */\n public async onBeforeEventsLoad(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called after events are loaded\n */\n public async onAfterEventsLoad(ctx: CommandKitPluginRuntime): Promise<void> {}\n\n /**\n * Called before the client logs in\n */\n public async onBeforeClientLogin(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called after the client logs in\n */\n public async onAfterClientLogin(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called before interaction is handled\n * @param interaction The interaction\n */\n public async onBeforeInteraction(\n ctx: CommandKitPluginRuntime,\n interaction: Interaction,\n ): Promise<void> {}\n\n /**\n * Called before message command is processed\n * @param message The message\n */\n public async onBeforeMessageCommand(\n ctx: CommandKitPluginRuntime,\n message: Message,\n ): Promise<void> {}\n\n /**\n * Called before command is executed. This method can execute the command itself.\n * @param source The source that triggered the command\n * @param command The command\n * @param execute The function that executes the command\n */\n public async executeCommand(\n ctx: CommandKitPluginRuntime,\n env: CommandKitEnvironment,\n source: Interaction | Message,\n command: PreparedAppCommandExecution,\n execute: () => Promise<any>,\n ): Promise<boolean> {\n return false;\n }\n\n /**\n * Called after events router is initialized\n * @param ctx The context\n */\n public async onEventsRouterInit(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called after commands router is initialized\n * @param ctx The context\n */\n public async onCommandsRouterInit(\n ctx: CommandKitPluginRuntime,\n ): Promise<void> {}\n\n /**\n * Called when HMR event is received\n * @param ctx The context\n * @param event The event\n */\n public async performHMR(\n ctx: CommandKitPluginRuntime,\n event: CommandKitHMREvent,\n ): Promise<void> {}\n\n /**\n * Called before command is loaded for registration. This method can be used to modify the command data before it is loaded.\n * @param ctx The context\n * @param commands The command that is being loaded. This is a CommandBuilderLike object which represents Discord's command\n */\n async prepareCommand(\n ctx: CommandKitPluginRuntime,\n commands: CommandBuilderLike,\n ): Promise<CommandBuilderLike | null> {\n return null;\n }\n\n /**\n * Called before command is registered to discord. This method can cancel the registration of the command and handle it manually.\n * @param ctx The context\n * @param data The command registration data\n */\n async onBeforeRegisterCommands(\n ctx: CommandKitPluginRuntime,\n event: PreRegisterCommandsEvent,\n ): Promise<void> {}\n\n /**\n * Called before global commands registration. This method can cancel the registration of the command and handle it manually.\n * This method is called after `onBeforeRegisterCommands` if that stage was not handled.\n * @param ctx The context\n * @param event The command registration data\n */\n async onBeforeRegisterGlobalCommands(\n ctx: CommandKitPluginRuntime,\n event: PreRegisterCommandsEvent,\n ): Promise<void> {}\n\n /**\n * Called before guild commands registration. This method can cancel the registration of the command and handle it manually.\n * This method is called before guilds of the command are resolved. It is called after `onBeforeRegisterCommands` if that stage was not handled.\n * @param ctx The context\n * @param event The command registration data\n */\n async onBeforePrepareGuildCommandsRegistration(\n ctx: CommandKitPluginRuntime,\n event: PreRegisterCommandsEvent,\n ): Promise<void> {}\n\n /**\n * Called before guild commands registration. This method can cancel the registration of the command and handle it manually.\n * This method is called after guilds of the command are resolved. It is called after `onBeforePrepareGuildCommandsRegistration` if that stage was not handled.\n * @param ctx The context\n * @param event The command registration data\n */\n async onBeforeRegisterGuildCommands(\n ctx: CommandKitPluginRuntime,\n event: PreRegisterCommandsEvent,\n ): Promise<void> {}\n\n /**\n * Called after command and all of its deferred functions are executed.\n * @param ctx The context\n * @param env The environment of the command. This environment contains the command execution data such as command context and more.\n */\n async onAfterCommand(\n ctx: CommandKitPluginRuntime,\n env: CommandKitEnvironment,\n ) {}\n\n /**\n * Called before emitting an event\n * @param ctx The context\n * @param event The event that is being emitted\n */\n public async willEmitEvent(\n ctx: CommandKitPluginRuntime,\n event: CommandKitEventDispatch,\n ) {}\n}\n\nexport function isRuntimePlugin(plugin: unknown): plugin is RuntimePlugin {\n return (\n plugin instanceof RuntimePlugin ||\n (isPlugin(plugin) && plugin.type === PluginType.Runtime)\n );\n}\n"],"mappings":";;;;;;AAiBA,IAAsB,gBAAtB,cAEA,kCAA0B;CACxB,AAAgB,OAAO,gCAAW;CAClC,AAAgB,0BAAU,IAAI,KAAa;;;;CAK3C,MAAa,qBACb,KACgB;;;;CAKhB,MAAa,oBACb,KACgB;;;;CAKhB,MAAa,mBACb,KACgB;;;;CAKhB,MAAa,kBAAkB,KAA6C;;;;CAK5E,MAAa,oBACb,KACgB;;;;CAKhB,MAAa,mBACb,KACgB;;;;;CAMhB,MAAa,oBACb,KACA,aACgB;;;;;CAMhB,MAAa,uBACb,KACA,SACgB;;;;;;;CAQhB,MAAa,eACb,KACA,KACA,QACA,SACA,SACmB;AACjB,SAAO;;;;;;CAOT,MAAa,mBACb,KACgB;;;;;CAMhB,MAAa,qBACb,KACgB;;;;;;CAOhB,MAAa,WACb,KACA,OACgB;;;;;;CAOhB,MAAM,eACN,KACA,UACqC;AACnC,SAAO;;;;;;;CAQT,MAAM,yBACN,KACA,OACgB;;;;;;;CAQhB,MAAM,+BACN,KACA,OACgB;;;;;;;CAQhB,MAAM,yCACN,KACA,OACgB;;;;;;;CAQhB,MAAM,8BACN,KACA,OACgB;;;;;;CAOhB,MAAM,eACN,KACA,KACA;;;;;;CAOA,MAAa,cACb,KACA,OACA;;AAGF,SAAgB,gBAAgB,QAA0C;AACxE,QACE,kBAAkB,iBAClB,8BAAS,OAAO,IAAI,OAAO,SAAS,gCAAW"}
@@ -1,14 +1,13 @@
1
- import { MaybeArray } from "./types-CJ-XvOFN.js";
2
- import { CommandKitSelectMenuBuilderInteractionCollectorDispatch, CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, CommandKitSelectMenuBuilderOnEnd } from "./common-DHTTnX82.js";
3
- import { StringSelectMenuKit } from "./StringSelectMenuKit-CJ0MzUZJ.js";
4
- import { ChannelSelectMenuKit } from "./ChannelSelectMenuKit-CsYgIyKe.js";
5
- import { MentionableSelectMenuKit } from "./MentionableSelectMenuKit-CO9phWMf.js";
6
- import { UserSelectMenuKit } from "./UserSelectMenuKit-C_J-9RJs.js";
7
- import { RoleSelectMenuKit } from "./RoleSelectMenuKit-DvBxzpWh.js";
1
+ import { t as MaybeArray } from "./types-BywA9d2Z.js";
2
+ import { n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-DnwCYit8.js";
3
+ import { n as StringSelectMenuKit } from "./StringSelectMenuKit-lVhUMc3g.js";
4
+ import { t as ChannelSelectMenuKit } from "./ChannelSelectMenuKit-HQZ4hH5s.js";
5
+ import { t as MentionableSelectMenuKit } from "./MentionableSelectMenuKit-7URDUM3-.js";
6
+ import { n as UserSelectMenuKit } from "./UserSelectMenuKit-CCj4Fpkr.js";
7
+ import { n as RoleSelectMenuKit } from "./RoleSelectMenuKit-BY-JJ18w.js";
8
8
  import { APISelectMenuOption, BaseSelectMenuComponentData, ChannelSelectMenuComponentData, ChannelSelectMenuInteraction, MentionableSelectMenuComponentData, MentionableSelectMenuInteraction, RoleSelectMenuComponentData, RoleSelectMenuInteraction, SelectMenuComponentOptionData, StringSelectMenuInteraction, StringSelectMenuOptionBuilder, UserSelectMenuComponentData, UserSelectMenuInteraction } from "discord.js";
9
9
 
10
10
  //#region src/components/interactive/select-menu/SelectMenu.d.ts
11
-
12
11
  /**
13
12
  * Type for the common properties shared by all select menu builders.
14
13
  */
@@ -133,5 +132,5 @@ interface ChannelSelectMenuProps extends Partial<Omit<ChannelSelectMenuComponent
133
132
  */
134
133
  declare function ChannelSelectMenu(props: ChannelSelectMenuProps): ChannelSelectMenuKit;
135
134
  //#endregion
136
- export { ChannelSelectMenu, ChannelSelectMenuProps, CommonBuilderKit, CommonSelectMenuProps, MentionableSelectMenu, MentionableSelectMenuProps, ResolveBuilderInteraction, RoleSelectMenu, RoleSelectMenuProps, SelectMenuProps, StringSelectMenu, StringSelectMenuOption, StringSelectMenuOptionProps, StringSelectMenuProps, UserSelectMenu, UserSelectMenuProps };
137
- //# sourceMappingURL=SelectMenu-VcDhOGoJ.d.ts.map
135
+ export { MentionableSelectMenu as a, RoleSelectMenu as c, StringSelectMenu as d, StringSelectMenuOption as f, UserSelectMenuProps as g, UserSelectMenu as h, CommonSelectMenuProps as i, RoleSelectMenuProps as l, StringSelectMenuProps as m, ChannelSelectMenuProps as n, MentionableSelectMenuProps as o, StringSelectMenuOptionProps as p, CommonBuilderKit as r, ResolveBuilderInteraction as s, ChannelSelectMenu as t, SelectMenuProps as u };
136
+ //# sourceMappingURL=SelectMenu-q_b3Mjv9.d.ts.map
@@ -0,0 +1,66 @@
1
+ import { r as EventInterceptorErrorHandler } from "./EventInterceptor-CZmWpS08.js";
2
+ import { a as OnSelectMenuKitSubmit, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-DnwCYit8.js";
3
+ import { StringSelectMenuBuilder, StringSelectMenuInteraction } from "discord.js";
4
+
5
+ //#region src/components/interactive/select-menu/StringSelectMenuKit.d.ts
6
+ /**
7
+ * Type for the handler function that is called when the string select menu is submitted.
8
+ */
9
+ type OnStringSelectMenuKitSubmit = OnSelectMenuKitSubmit<StringSelectMenuInteraction, StringSelectMenuKit>;
10
+ /**
11
+ * Type for the predicate function that filters string select menu interactions.
12
+ * It receives a StringSelectMenuInteraction and returns a boolean or a Promise that resolves to a boolean.
13
+ */
14
+ type StringSelectMenuKitPredicate = SelectMenuKitPredicate<StringSelectMenuInteraction>;
15
+ /**
16
+ * A builder for creating string select menus with additional features like interaction collectors and event handling.
17
+ * This class extends the StringSelectMenuBuilder from discord.js and adds methods for handling interactions.
18
+ * It allows you to set a handler for when the string select menu is submitted, filter interactions, and handle the end of the interaction collector.
19
+ */
20
+ declare class StringSelectMenuKit extends StringSelectMenuBuilder {
21
+ #private;
22
+ /**
23
+ * Sets the handler to run when the modal is submitted.
24
+ * @param handler - The handler to run when the modal is submitted.
25
+ * @param data - The context data for the interaction collector.
26
+ * @returns This instance of the modal builder.
27
+ * @example
28
+ * ```ts
29
+ * const modal = new StringSelectMenuKit()
30
+ * .setTitle('My Modal')
31
+ * .setCustomId('my-modal')
32
+ * .filter((interaction) => interaction.user.id === '1234567890')
33
+ * .onSelect(async (interaction) => {
34
+ * await interaction.reply('You submitted the modal!');
35
+ * })
36
+ * .addComponents(actionRow1, actionRow2);
37
+ * ```
38
+ */
39
+ onSelect(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch<StringSelectMenuInteraction, StringSelectMenuKit>, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData): this;
40
+ /**
41
+ * Sets the handler to run when the interaction collector ends.
42
+ * @param handler - The handler to run when the interaction collector ends.
43
+ * @returns This instance of the modal builder.
44
+ */
45
+ onEnd(handler: CommandKitSelectMenuBuilderOnEnd): this;
46
+ /**
47
+ * Sets the handler to run when the interaction collector ends.
48
+ * @param handler - The handler to run when the interaction collector ends.
49
+ * @returns This instance of the modal builder.
50
+ */
51
+ onError(handler: EventInterceptorErrorHandler): this;
52
+ /**
53
+ * Sets a filter for the interaction collector.
54
+ * @param predicate - The filter to use for the interaction collector.
55
+ * @returns This instance of the modal builder.
56
+ */
57
+ filter(predicate: SelectMenuKitPredicate<StringSelectMenuInteraction>): this;
58
+ private get customId();
59
+ /**
60
+ * Disposes of the interaction collector and cleans up resources.
61
+ */
62
+ dispose(): this;
63
+ }
64
+ //#endregion
65
+ export { StringSelectMenuKit as n, StringSelectMenuKitPredicate as r, OnStringSelectMenuKitSubmit as t };
66
+ //# sourceMappingURL=StringSelectMenuKit-lVhUMc3g.d.ts.map