commandkit 1.2.0-rc.14 → 1.2.0-rc.15

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 (337) hide show
  1. package/README.md +42 -23
  2. package/dist/{ActionRow-CT-uyxW0.d.ts → ActionRow-Bt9qi0Mb.d.ts} +2 -2
  3. package/dist/{Button-oMnlpF6W.d.ts → Button-DxJLcZIU.d.ts} +5 -5
  4. package/dist/{ButtonKit-DKu0VAe4.d.ts → ButtonKit-BfcyvWfj.d.ts} +35 -35
  5. package/dist/{ChannelSelectMenuKit-HQZ4hH5s.d.ts → ChannelSelectMenuKit-DYkudikb.d.ts} +33 -33
  6. package/dist/{CommandsRouter-C7dZEepB.d.ts → CommandsRouter-DiNoF0dq.d.ts} +48 -48
  7. package/dist/{EventInterceptor-CZmWpS08.d.ts → EventInterceptor-D9JKMcfi.d.ts} +39 -39
  8. package/dist/{EventsRouter-DZ37r54v.d.ts → EventsRouter-EuuSu6NH.d.ts} +34 -34
  9. package/dist/{MentionableSelectMenuKit-7URDUM3-.d.ts → MentionableSelectMenuKit-Mu4xqP6B.d.ts} +33 -33
  10. package/dist/MessageCommandParser-DPCbHXCS.d.ts +194 -0
  11. package/dist/{Modal--iMEUqSm.d.ts → Modal-v9rrcMl-.d.ts} +7 -7
  12. package/dist/{ModalKit-BWXI3Z26.d.ts → ModalKit-XJSM65SV.d.ts} +32 -32
  13. package/dist/{RoleSelectMenuKit-BY-JJ18w.d.ts → RoleSelectMenuKit-CCjcp3HY.d.ts} +33 -33
  14. package/dist/{SelectMenu-DQbmOp1Y.d.ts → SelectMenu-CY0vvoSu.d.ts} +8 -8
  15. package/dist/{StringSelectMenuKit-lVhUMc3g.d.ts → StringSelectMenuKit-G5nBTicX.d.ts} +33 -33
  16. package/dist/{UserSelectMenuKit-CCj4Fpkr.d.ts → UserSelectMenuKit-D3SO_fXA.d.ts} +33 -33
  17. package/dist/analytics/analytics-engine.d.ts +1 -1
  18. package/dist/analytics/analytics-engine.js +2 -19
  19. package/dist/analytics/analytics-provider.d.ts +1 -1
  20. package/dist/analytics/analytics-provider.js +1 -0
  21. package/dist/analytics/constants.js +26 -3
  22. package/dist/analytics/constants.js.map +1 -0
  23. package/dist/analytics/utils.js +2 -19
  24. package/dist/{analytics-engine-_urJ5QTH.d.ts → analytics-engine-DnRsHBId.d.ts} +843 -843
  25. package/dist/app/commands/AppCommandRunner.d.ts +1 -1
  26. package/dist/app/commands/AppCommandRunner.js +2 -19
  27. package/dist/app/commands/Context.d.ts +1 -1
  28. package/dist/app/commands/Context.js +2 -19
  29. package/dist/app/commands/MessageCommandParser.d.ts +1 -1
  30. package/dist/app/commands/MessageCommandParser.js +261 -3
  31. package/dist/app/commands/MessageCommandParser.js.map +1 -0
  32. package/dist/app/commands/helpers.d.ts +1 -1
  33. package/dist/app/commands/helpers.js +25 -3
  34. package/dist/app/commands/helpers.js.map +1 -0
  35. package/dist/app/events/EventWorkerContext.d.ts +2 -2
  36. package/dist/app/events/EventWorkerContext.js +48 -5
  37. package/dist/app/events/EventWorkerContext.js.map +1 -0
  38. package/dist/app/handlers/AppCommandHandler.d.ts +1 -1
  39. package/dist/app/handlers/AppCommandHandler.js +2 -19
  40. package/dist/app/handlers/AppEventsHandler.d.ts +1 -1
  41. package/dist/app/handlers/AppEventsHandler.js +2 -19
  42. package/dist/app/index.d.ts +4 -4
  43. package/dist/app/index.js +13 -27
  44. package/dist/app/interrupt/signals.d.ts +1 -1
  45. package/dist/app/interrupt/signals.js +54 -6
  46. package/dist/app/interrupt/signals.js.map +1 -0
  47. package/dist/app/middlewares/permissions.d.ts +1 -1
  48. package/dist/app/middlewares/permissions.js +2 -19
  49. package/dist/app/register/CommandRegistrar.d.ts +1 -1
  50. package/dist/app/register/CommandRegistrar.js +2 -19
  51. package/dist/app/router/CommandsRouter.d.ts +1 -1
  52. package/dist/app/router/CommandsRouter.js +210 -2
  53. package/dist/app/router/CommandsRouter.js.map +1 -0
  54. package/dist/app/router/EventsRouter.d.ts +1 -1
  55. package/dist/app/router/EventsRouter.js +128 -2
  56. package/dist/app/router/EventsRouter.js.map +1 -0
  57. package/dist/app/router/index.d.ts +2 -2
  58. package/dist/app/router/index.js +5 -5
  59. package/dist/{chunk-kSYXY2_d.js → chunk-BE-pF4vm.js} +1 -1
  60. package/dist/cli/app-process.d.ts +2 -2
  61. package/dist/cli/app-process.js +6 -8
  62. package/dist/cli/app-process.js.map +1 -1
  63. package/dist/cli/build.d.ts +2 -2
  64. package/dist/cli/build.js +15 -30
  65. package/dist/cli/build.js.map +1 -1
  66. package/dist/cli/common.d.ts +5 -5
  67. package/dist/cli/common.js +182 -12
  68. package/dist/cli/common.js.map +1 -0
  69. package/dist/cli/development.d.ts +3 -3
  70. package/dist/cli/development.js +38 -54
  71. package/dist/cli/development.js.map +1 -1
  72. package/dist/cli/env.js +73 -9
  73. package/dist/cli/env.js.map +1 -0
  74. package/dist/cli/generators.js +10 -10
  75. package/dist/cli/generators.js.map +1 -1
  76. package/dist/cli/information.js +9 -8
  77. package/dist/cli/information.js.map +1 -1
  78. package/dist/cli/init.d.ts +2 -2
  79. package/dist/cli/init.js +14 -28
  80. package/dist/cli/init.js.map +1 -1
  81. package/dist/cli/production.d.ts +2 -2
  82. package/dist/cli/production.js +11 -28
  83. package/dist/cli/production.js.map +1 -1
  84. package/dist/cli/type-checker.js +83 -6
  85. package/dist/cli/type-checker.js.map +1 -0
  86. package/dist/cli/utils.js +1 -0
  87. package/dist/cli/utils.js.map +1 -1
  88. package/dist/{commandkit-B1_NP74k.js → commandkit--k6yDJEr.js} +192 -192
  89. package/dist/{commandkit-B1_NP74k.js.map → commandkit--k6yDJEr.js.map} +1 -1
  90. package/dist/commandkit.d.ts +1 -1
  91. package/dist/commandkit.js +2 -19
  92. package/dist/{common-DnwCYit8.d.ts → common-CCvvgnxi.d.ts} +2 -2
  93. package/dist/components/common/EventInterceptor.d.ts +1 -1
  94. package/dist/components/common/EventInterceptor.js +137 -2
  95. package/dist/components/common/EventInterceptor.js.map +1 -0
  96. package/dist/components/common/element.d.ts +1 -1
  97. package/dist/components/common/element.js +2 -19
  98. package/dist/components/common/types.d.ts +1 -1
  99. package/dist/components/common/types.js +1 -0
  100. package/dist/components/display/common.js +2 -19
  101. package/dist/components/display/container.d.ts +1 -1
  102. package/dist/components/display/container.js +2 -19
  103. package/dist/components/display/file.d.ts +1 -1
  104. package/dist/components/display/file.js +23 -2
  105. package/dist/components/display/file.js.map +1 -0
  106. package/dist/components/display/index.d.ts +8 -8
  107. package/dist/components/display/index.js +12 -25
  108. package/dist/components/display/label.d.ts +1 -1
  109. package/dist/components/display/label.js +2 -19
  110. package/dist/components/display/media-gallery.d.ts +1 -1
  111. package/dist/components/display/media-gallery.js +2 -19
  112. package/dist/components/display/poll.d.ts +1 -1
  113. package/dist/components/display/poll.js +85 -4
  114. package/dist/{poll-ziQQQbMU.js.map → components/display/poll.js.map} +1 -1
  115. package/dist/components/display/section.d.ts +1 -1
  116. package/dist/components/display/section.js +2 -19
  117. package/dist/components/display/separator.d.ts +1 -1
  118. package/dist/components/display/separator.js +21 -2
  119. package/dist/components/display/separator.js.map +1 -0
  120. package/dist/components/display/text-display.d.ts +1 -1
  121. package/dist/components/display/text-display.js +26 -2
  122. package/dist/components/display/text-display.js.map +1 -0
  123. package/dist/components/index.d.ts +22 -22
  124. package/dist/components/index.js +14 -26
  125. package/dist/components/interactive/action-row/ActionRow.d.ts +1 -1
  126. package/dist/components/interactive/action-row/ActionRow.js +20 -2
  127. package/dist/{ActionRow-CSN_UKmM.js.map → components/interactive/action-row/ActionRow.js.map} +1 -1
  128. package/dist/components/interactive/button/Button.d.ts +1 -1
  129. package/dist/components/interactive/button/Button.js +2 -19
  130. package/dist/components/interactive/button/ButtonKit.d.ts +1 -1
  131. package/dist/components/interactive/button/ButtonKit.js +2 -19
  132. package/dist/components/interactive/modal/Modal.d.ts +1 -1
  133. package/dist/components/interactive/modal/Modal.js +2 -19
  134. package/dist/components/interactive/modal/ModalKit.d.ts +1 -1
  135. package/dist/components/interactive/modal/ModalKit.js +2 -19
  136. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +1 -1
  137. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +2 -19
  138. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +1 -1
  139. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +2 -19
  140. package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +1 -1
  141. package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +2 -19
  142. package/dist/components/interactive/select-menu/SelectMenu.d.ts +1 -1
  143. package/dist/components/interactive/select-menu/SelectMenu.js +2 -19
  144. package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +1 -1
  145. package/dist/components/interactive/select-menu/StringSelectMenuKit.js +2 -19
  146. package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +1 -1
  147. package/dist/components/interactive/select-menu/UserSelectMenuKit.js +2 -19
  148. package/dist/components/interactive/select-menu/common.d.ts +1 -1
  149. package/dist/components/interactive/select-menu/common.js +1 -0
  150. package/dist/config/config.d.ts +1 -1
  151. package/dist/config/config.js +2 -19
  152. package/dist/config/default.d.ts +1 -1
  153. package/dist/config/default.js +2 -19
  154. package/dist/config/loader.d.ts +1 -1
  155. package/dist/config/loader.js +2 -19
  156. package/dist/config/types.d.ts +1 -1
  157. package/dist/config/types.js +1 -0
  158. package/dist/config/utils.d.ts +1 -1
  159. package/dist/config/utils.js +29 -2
  160. package/dist/config/utils.js.map +1 -0
  161. package/dist/{constants-EpKcj0dH.d.ts → constants-DqtJY0t-.d.ts} +2 -2
  162. package/dist/{constants-CuYW0K10.d.ts → constants-DwxpkIeH.d.ts} +7 -7
  163. package/dist/{container-DYcb7zGw.d.ts → container-CYojOA9d.d.ts} +1 -1
  164. package/dist/context/async-context.d.ts +1 -1
  165. package/dist/context/async-context.js +2 -19
  166. package/dist/context/environment.d.ts +1 -1
  167. package/dist/context/environment.js +2 -19
  168. package/dist/{element-DZeqbSTk.d.ts → element-DeLvTMfZ.d.ts} +3 -3
  169. package/dist/events/CommandKitEventsChannel.d.ts +1 -1
  170. package/dist/events/CommandKitEventsChannel.js +83 -2
  171. package/dist/events/CommandKitEventsChannel.js.map +1 -0
  172. package/dist/{file-CrV4lSnl.d.ts → file-DLO1zEcH.d.ts} +1 -1
  173. package/dist/flags/FlagProvider.d.ts +1 -1
  174. package/dist/flags/FlagProvider.js +1 -0
  175. package/dist/flags/FlagProvider.js.map +1 -1
  176. package/dist/flags/feature-flags.d.ts +1 -1
  177. package/dist/flags/feature-flags.js +2 -19
  178. package/dist/flags/store.d.ts +1 -1
  179. package/dist/flags/store.js +13 -2
  180. package/dist/flags/store.js.map +1 -0
  181. package/dist/{helpers-AQPLVY35.d.ts → helpers-zmC44Mcu.d.ts} +1 -1
  182. package/dist/index.d.ts +30 -30
  183. package/dist/index.js +61 -67
  184. package/dist/kv/constants.d.ts +1 -1
  185. package/dist/kv/constants.js +22 -2
  186. package/dist/kv/constants.js.map +1 -0
  187. package/dist/kv/dotprops.js +1 -0
  188. package/dist/kv/dotprops.js.map +1 -1
  189. package/dist/kv/kv.d.ts +288 -288
  190. package/dist/kv/kv.js +2 -1
  191. package/dist/kv/kv.js.map +1 -1
  192. package/dist/kv/serde.d.ts +1 -1
  193. package/dist/kv/serde.js +29 -28
  194. package/dist/kv/serde.js.map +1 -1
  195. package/dist/{label-37kaNWMH.d.ts → label-DqGRqodo.d.ts} +3 -3
  196. package/dist/logger/DefaultLogger.d.ts +19 -19
  197. package/dist/logger/DefaultLogger.js +2 -19
  198. package/dist/logger/ILogger.d.ts +35 -35
  199. package/dist/logger/ILogger.js +1 -0
  200. package/dist/logger/Logger.d.ts +5 -5
  201. package/dist/logger/Logger.js +2 -19
  202. package/dist/logger/NoopLogger.d.ts +35 -35
  203. package/dist/logger/NoopLogger.js +1 -0
  204. package/dist/logger/NoopLogger.js.map +1 -1
  205. package/dist/{media-gallery-Ci3I4ElH.d.ts → media-gallery-Ca8es-eB.d.ts} +1 -1
  206. package/dist/plugins/CompilerPlugin.d.ts +1 -1
  207. package/dist/plugins/CompilerPlugin.js +33 -3
  208. package/dist/plugins/CompilerPlugin.js.map +1 -0
  209. package/dist/plugins/PluginCommon.d.ts +1 -1
  210. package/dist/plugins/PluginCommon.js +55 -4
  211. package/dist/plugins/PluginCommon.js.map +1 -0
  212. package/dist/plugins/RuntimePlugin.d.ts +1 -1
  213. package/dist/plugins/RuntimePlugin.js +124 -3
  214. package/dist/plugins/RuntimePlugin.js.map +1 -0
  215. package/dist/plugins/index.d.ts +1 -1
  216. package/dist/plugins/index.js +8 -25
  217. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -1
  218. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +2 -19
  219. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -1
  220. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +2 -19
  221. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -1
  222. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +2 -19
  223. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -1
  224. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +2 -19
  225. package/dist/plugins/plugin-runtime/runtime.d.ts +1 -1
  226. package/dist/plugins/plugin-runtime/runtime.js +1 -0
  227. package/dist/plugins/types.d.ts +1 -1
  228. package/dist/plugins/types.js +1 -0
  229. package/dist/{poll-Ddtapd6n.d.ts → poll-DQ6DX_Tt.d.ts} +8 -8
  230. package/dist/{section-DkUKULnB.d.ts → section-Q8nwx_-q.d.ts} +1 -1
  231. package/dist/{separator-CbXsIFCa.d.ts → separator-B8P-kdIK.d.ts} +1 -1
  232. package/dist/{signals-BbTgTc0i.d.ts → signals-CBXwugBW.d.ts} +1 -1
  233. package/dist/{text-display-D7j39VC-.d.ts → text-display-CL9C2yMc.d.ts} +1 -1
  234. package/dist/{types-BywA9d2Z.d.ts → types-DZy7U-Ld.d.ts} +1 -1
  235. package/dist/types.d.ts +1 -1
  236. package/dist/types.js +1 -0
  237. package/dist/utils/colors.js +9 -3
  238. package/dist/utils/colors.js.map +1 -0
  239. package/dist/utils/constants.d.ts +1 -1
  240. package/dist/utils/constants.js +50 -8
  241. package/dist/utils/constants.js.map +1 -0
  242. package/dist/utils/dev-hooks.d.ts +1 -1
  243. package/dist/utils/dev-hooks.js +2 -19
  244. package/dist/utils/error-codes.d.ts +10 -10
  245. package/dist/utils/error-codes.js +53 -5
  246. package/dist/utils/error-codes.js.map +1 -0
  247. package/dist/utils/resolve-file-url.js +18 -2
  248. package/dist/utils/resolve-file-url.js.map +1 -0
  249. package/dist/utils/types-package.js +61 -4
  250. package/dist/utils/types-package.js.map +1 -0
  251. package/dist/utils/useful-stuff/async-queue.d.ts +21 -21
  252. package/dist/utils/useful-stuff/async-queue.js +1 -0
  253. package/dist/utils/useful-stuff/async-queue.js.map +1 -1
  254. package/dist/utils/useful-stuff/mutex.d.ts +62 -62
  255. package/dist/utils/useful-stuff/mutex.js +1 -0
  256. package/dist/utils/useful-stuff/mutex.js.map +1 -1
  257. package/dist/utils/useful-stuff/ratelimiter.d.ts +56 -56
  258. package/dist/utils/useful-stuff/ratelimiter.js +1 -0
  259. package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
  260. package/dist/utils/useful-stuff/semaphore.d.ts +82 -82
  261. package/dist/utils/useful-stuff/semaphore.js +1 -0
  262. package/dist/utils/useful-stuff/semaphore.js.map +1 -1
  263. package/dist/utils/utilities.d.ts +5 -5
  264. package/dist/utils/utilities.js +2 -19
  265. package/dist/utils/warning.js +38 -4
  266. package/dist/utils/warning.js.map +1 -0
  267. package/dist/version.js +13 -2
  268. package/dist/version.js.map +1 -0
  269. package/package.json +11 -14
  270. package/dist/ActionRow-CSN_UKmM.js +0 -25
  271. package/dist/CommandKitEventsChannel-DDI0UVh9.js +0 -88
  272. package/dist/CommandKitEventsChannel-DDI0UVh9.js.map +0 -1
  273. package/dist/CommandsRouter-D5mGRFEr.js +0 -215
  274. package/dist/CommandsRouter-D5mGRFEr.js.map +0 -1
  275. package/dist/CompilerPlugin-DZidFuHJ.js +0 -43
  276. package/dist/CompilerPlugin-DZidFuHJ.js.map +0 -1
  277. package/dist/EventInterceptor-CxA95XYA.js +0 -142
  278. package/dist/EventInterceptor-CxA95XYA.js.map +0 -1
  279. package/dist/EventWorkerContext-CfqamFWu.js +0 -68
  280. package/dist/EventWorkerContext-CfqamFWu.js.map +0 -1
  281. package/dist/EventsRouter-Be5NDOX4.js +0 -133
  282. package/dist/EventsRouter-Be5NDOX4.js.map +0 -1
  283. package/dist/ILogger-JI8VGyJf.js +0 -0
  284. package/dist/MessageCommandParser-VMFFGs0R.js +0 -271
  285. package/dist/MessageCommandParser-VMFFGs0R.js.map +0 -1
  286. package/dist/MessageCommandParser-q3dQcE5N.d.ts +0 -194
  287. package/dist/PluginCommon-Bfs8d9s7.js +0 -70
  288. package/dist/PluginCommon-Bfs8d9s7.js.map +0 -1
  289. package/dist/RuntimePlugin-BYQXQO8w.js +0 -134
  290. package/dist/RuntimePlugin-BYQXQO8w.js.map +0 -1
  291. package/dist/colors-Csc0X4QJ.js +0 -14
  292. package/dist/colors-Csc0X4QJ.js.map +0 -1
  293. package/dist/common-vGj3fpz3.js +0 -0
  294. package/dist/common-zQwj90Nz.js +0 -222
  295. package/dist/common-zQwj90Nz.js.map +0 -1
  296. package/dist/constants-BA0TJU6e.js +0 -36
  297. package/dist/constants-BA0TJU6e.js.map +0 -1
  298. package/dist/constants-BS9N2avz.js +0 -27
  299. package/dist/constants-BS9N2avz.js.map +0 -1
  300. package/dist/constants-CeIMhMD0.js +0 -85
  301. package/dist/constants-CeIMhMD0.js.map +0 -1
  302. package/dist/env-FxaiNasU.js +0 -113
  303. package/dist/env-FxaiNasU.js.map +0 -1
  304. package/dist/error-codes-Ds0bnPvT.js +0 -73
  305. package/dist/error-codes-Ds0bnPvT.js.map +0 -1
  306. package/dist/file-DqI3v90P.js +0 -28
  307. package/dist/file-DqI3v90P.js.map +0 -1
  308. package/dist/helpers-DSy7EjzP.js +0 -35
  309. package/dist/helpers-DSy7EjzP.js.map +0 -1
  310. package/dist/poll-ziQQQbMU.js +0 -100
  311. package/dist/resolve-file-url-BmjHzIKe.js +0 -23
  312. package/dist/resolve-file-url-BmjHzIKe.js.map +0 -1
  313. package/dist/router-CtcApqrw.js +0 -0
  314. package/dist/runtime-UJIpkNww.js +0 -0
  315. package/dist/separator-DGwA_b1J.js +0 -26
  316. package/dist/separator-DGwA_b1J.js.map +0 -1
  317. package/dist/signals-ewEPW2cO.js +0 -74
  318. package/dist/signals-ewEPW2cO.js.map +0 -1
  319. package/dist/store-DK4JA-fQ.js +0 -18
  320. package/dist/store-DK4JA-fQ.js.map +0 -1
  321. package/dist/text-display-BVuG7dT-.js +0 -31
  322. package/dist/text-display-BVuG7dT-.js.map +0 -1
  323. package/dist/type-checker-CFpKDDs8.js +0 -88
  324. package/dist/type-checker-CFpKDDs8.js.map +0 -1
  325. package/dist/types-Bx1EKe0v.js +0 -0
  326. package/dist/types-CAwOz52q.js +0 -0
  327. package/dist/types-package-Bjh_ap0V.js +0 -71
  328. package/dist/types-package-Bjh_ap0V.js.map +0 -1
  329. package/dist/utils-CVaVycsK.js +0 -34
  330. package/dist/utils-CVaVycsK.js.map +0 -1
  331. package/dist/version-DNg-wh2E.js +0 -18
  332. package/dist/version-DNg-wh2E.js.map +0 -1
  333. package/dist/warning-BWiQltHE.js +0 -53
  334. package/dist/warning-BWiQltHE.js.map +0 -1
  335. /package/dist/{index-BJfko-dP.d.ts → index-BIsCUWAs.d.ts} +0 -0
  336. /package/dist/{index-CCggO_hw.d.ts → index-CwHYpK-f.d.ts} +0 -0
  337. /package/dist/{index-CLjpoGi1.d.ts → index-DHrsNvX1.d.ts} +0 -0
package/README.md CHANGED
@@ -6,43 +6,62 @@
6
6
  <a href="https://www.npmjs.com/package/commandkit"><img src="https://img.shields.io/npm/dt/commandkit?maxAge=3600" alt="npm downloads" /></a>
7
7
  </div>
8
8
 
9
- <p align="center">The discord.js meta-framework for building powerful, modular, and extensible Discord bots with ease.</p>
9
+ <p align="center">Stop rebuilding command and event handlers for every new discord.js bot. CommandKit does it for you and a lot more.</p>
10
+
11
+ ## Why CommandKit?
12
+
13
+ Every new discord.js project starts the same way: write a command handler, write an event handler, set up interaction collectors, register slash commands with the API, figure out a project structure. It's hours of boilerplate before you write any real bot logic.
14
+
15
+ Most existing discord.js frameworks solve this by giving you a handler class you instantiate and point at a folder — and that's about it. They're loaders, not frameworks. Others like Sapphire go further and have decent features, but require heavy OOP boilerplate where everything is a class extending a base class.
16
+
17
+ CommandKit takes a different approach entirely. It works like a proper meta-framework — think **Next.js for Discord bots**. It ships with a smart CLI that handles bundling, TypeScript/JSX compilation, hot-reloading, command registration, and project scaffolding automatically. You run `commandkit dev` and everything just works — zero configuration.
18
+
19
+ The design philosophy is **convention over configuration**: put a file in `src/app/commands/` and it's a command. Put a file in `src/app/events/` and it's an event listener. Export a `chatInput` function and it handles slash commands. Export a `message` function in the same file and it handles prefix commands too. No registration calls, no base classes, no decorators. The framework knows what to do with your code based on where it is and what it exports — so you skip the setup and go straight to building.
10
20
 
11
21
  ## Features
12
22
 
13
- - Beginner friendly 🚀
14
- - Suitable for both beginners and advanced users 👶👨‍💻
15
- - Slash + context menu commands + prefix commands support ✅
16
- - Automatic command registration and updates 🤖
17
- - Command middlewares for easy command management 🛠️
18
- - Localization support through `@commandkit/i18n` plugin 🌍
19
- - Plugin system to extend functionality 🔌
20
- - Built-in command line interface for easy development 🖥️
21
- - Out-of-the-box support for TypeScript and JavaScript 📜
22
- - Built-in customizable cache system for speedy data storage and retrieval 🗄️
23
- - User installable/guild scoped commands 🔧
24
- - Custom events support 🔔
25
- - JSX support for declaring Discord interaction components and modals 🎨
26
- - Easy to use interaction components and modals system (forget about collectors) 🧩
27
- - Less boilerplate code, more productivity 💪
28
- - and much more...
23
+ ### Automatic command and event handling
24
+ Drop your command files in a folder, export a function, and they just work. Slash commands, context menu commands, and prefix commands are all supported under a single unified command structure — no separate handler for each type. Commands are automatically registered and kept in sync with Discord. Events work the same way: create a file, export a listener, and CommandKit handles the rest.
29
25
 
30
- ## Getting Started
26
+ ### JSX components for Discord UI
27
+ discord.js builder chains (`ActionRowBuilder` → `ButtonBuilder` → `setCustomId` → ...) get messy fast. CommandKit lets you write Discord components in JSX — the same declarative syntax used in React — so your UI code is clean and readable.
28
+
29
+ ### Built-in component handlers (no more collectors)
30
+ Buttons get `onClick`. Modals get `onSubmit`. Select menus get `onSelect`. Define a component and its behavior in one place — no `InteractionCollector` setup, no timeout management, no cleanup boilerplate.
31
31
 
32
- Get started by checking out the [documentation](https://commandkit.dev).
32
+ ### Command middlewares
33
+ Run logic before or after any command executes — permission checks, cooldowns, logging, analytics — without touching the command itself. A proper middleware layer, like you'd find in Express.
33
34
 
34
- ## Installation
35
+ ### Unified prefix commands
36
+ Message-based (prefix) commands live in the same file as your slash commands and context menus. One command file handles all input types. No separate handler needed.
35
37
 
36
- [![npm](https://nodei.co/npm/commandkit.png)](https://nodei.co/npm/commandkit/)
38
+ ### Caching with Redis support
39
+ The `@commandkit/cache` plugin gives you a customizable caching layer — in-memory by default, Redis-backed when you need persistence. Just add the `'use cache'` directive to any function.
37
40
 
38
- To create a new CommandKit project, you can use the following command:
41
+ ### Plugin system with custom events
42
+ Extend CommandKit through plugins that hook into the framework lifecycle. Plugins can emit custom events — for example, listening to an external webhook and firing events your bot can react to. This isn't a wrapper around `node:events`; it's a structured extension system for building modular, decoupled bot features. Official plugins include `@commandkit/i18n` for localization and `@commandkit/analytics` for usage tracking.
39
43
 
44
+ ### AI-powered command execution
45
+ The `@commandkit/ai` plugin lets users interact with your bot through natural language. Instead of memorizing slash command names, users just talk to your bot — and the AI figures out which command to run. Built on the [AI SDK](https://ai-sdk.dev) with support for Google Gemini, OpenAI, and more. Includes built-in tools, custom tool support, lifecycle hooks, and per-user model selection.
46
+
47
+ ### Zero-config TypeScript and JavaScript
48
+ Native TypeScript and JSX support with no configuration. No `tsconfig.json` fiddling, no separate build step, no bundler setup. The CLI handles compilation, bundling, hot-reloading, and project scaffolding.
49
+
50
+ ## Who is this for?
51
+
52
+ - **Beginners** who don't want to spend hours building handlers before they can do anything useful
53
+ - **Experienced developers** tired of rebuilding the same boilerplate for every new bot project
54
+ - **Teams and freelancers** who need a reliable, structured foundation they can build on quickly
55
+
56
+ CommandKit has been used in production client projects and has saved hours of setup time on each one. It's not overhead — it's the setup work you'd do anyway, already done well.
57
+
58
+ ## Getting Started
40
59
 
41
60
  ```bash
42
61
  npm create commandkit
43
62
  ```
44
63
 
45
- This will prompt you to enter few details about your project. Once you have entered the details, you can simply run `commandkit dev` to start the bot application.
64
+ Follow the prompts, then run `commandkit dev` to start your bot. Check out the [documentation](https://commandkit.dev) for guides and API reference.
46
65
 
47
66
  ## Support and Suggestions
48
67
 
@@ -1,4 +1,4 @@
1
- import { n as CommandKitElement, t as AnyCommandKitElement } from "./element-DZeqbSTk.js";
1
+ import { n as CommandKitElement, t as AnyCommandKitElement } from "./element-DeLvTMfZ.js";
2
2
 
3
3
  //#region src/components/interactive/action-row/ActionRow.d.ts
4
4
  /**
@@ -16,4 +16,4 @@ interface ActionRowProps {
16
16
  declare function ActionRow(props: ActionRowProps): CommandKitElement<'action-row'>;
17
17
  //#endregion
18
18
  export { ActionRowProps as n, ActionRow as t };
19
- //# sourceMappingURL=ActionRow-CT-uyxW0.d.ts.map
19
+ //# sourceMappingURL=ActionRow-Bt9qi0Mb.d.ts.map
@@ -1,7 +1,7 @@
1
- import { r as EventInterceptorErrorHandler } from "./EventInterceptor-CZmWpS08.js";
2
- import { a as CommandKitButtonBuilderOnEnd, i as CommandKitButtonBuilderInteractionCollectorDispatchContextData, r as CommandKitButtonBuilderInteractionCollectorDispatch } from "./ButtonKit-DKu0VAe4.js";
3
- import { n as CommandKitElement } from "./element-DZeqbSTk.js";
4
- import { t as MaybeArray } from "./types-BywA9d2Z.js";
1
+ import { r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
2
+ import { a as CommandKitButtonBuilderOnEnd, i as CommandKitButtonBuilderInteractionCollectorDispatchContextData, r as CommandKitButtonBuilderInteractionCollectorDispatch } from "./ButtonKit-BfcyvWfj.js";
3
+ import { n as CommandKitElement } from "./element-DeLvTMfZ.js";
4
+ import { t as MaybeArray } from "./types-DZy7U-Ld.js";
5
5
  import { ButtonStyle, ComponentEmojiResolvable } from "discord.js";
6
6
 
7
7
  //#region src/components/interactive/button/Button.d.ts
@@ -35,4 +35,4 @@ interface ButtonProps {
35
35
  declare function Button(props: ButtonProps): CommandKitElement<'button-kit'>;
36
36
  //#endregion
37
37
  export { ButtonChildrenLike as n, ButtonProps as r, Button as t };
38
- //# sourceMappingURL=Button-oMnlpF6W.d.ts.map
38
+ //# sourceMappingURL=Button-DxJLcZIU.d.ts.map
@@ -1,4 +1,4 @@
1
- import { n as EventInterceptorContextData, r as EventInterceptorErrorHandler } from "./EventInterceptor-CZmWpS08.js";
1
+ import { n as EventInterceptorContextData, r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
2
2
  import { Awaitable, ButtonBuilder, ButtonInteraction, Events } from "discord.js";
3
3
 
4
4
  //#region src/components/interactive/button/ButtonKit.d.ts
@@ -38,49 +38,49 @@ type CommandKitButtonBuilderInteractionCollectorDispatchContextData = EventInter
38
38
  declare class ButtonKit extends ButtonBuilder {
39
39
  #private;
40
40
  /**
41
- * Sets up an inline interaction collector for this button. This collector by default allows as many interactions as possible if it is actively used.
42
- * If unused, this expires after 24 hours or custom time if specified.
43
- * @param handler The handler to run when the button is clicked
44
- * @param data The context data to use for the interaction collector
45
- * @returns This button
46
- * @example
47
- * ```ts
48
- * const button = new ButtonKit()
49
- * .setLabel('Click me')
50
- * .setStyle(ButtonStyle.Primary)
51
- * .setCustomId('click_me')
52
- * .filter((interaction) => interaction.user.id === '1234567890')
53
- * .onClick(async (interaction) => {
54
- * await interaction.reply('You clicked me!');
55
- * });
56
- *
57
- * const row = new ActionRowBuilder().addComponents(button);
58
- *
59
- * const message = await channel.send({ content: 'Click the button', components: [row] });
60
- *
61
- * // Remove onClick handler and destroy the interaction collector
62
- * button.onClick(null);
63
- * ```
64
- */
41
+ * Sets up an inline interaction collector for this button. This collector by default allows as many interactions as possible if it is actively used.
42
+ * If unused, this expires after 24 hours or custom time if specified.
43
+ * @param handler The handler to run when the button is clicked
44
+ * @param data The context data to use for the interaction collector
45
+ * @returns This button
46
+ * @example
47
+ * ```ts
48
+ * const button = new ButtonKit()
49
+ * .setLabel('Click me')
50
+ * .setStyle(ButtonStyle.Primary)
51
+ * .setCustomId('click_me')
52
+ * .filter((interaction) => interaction.user.id === '1234567890')
53
+ * .onClick(async (interaction) => {
54
+ * await interaction.reply('You clicked me!');
55
+ * });
56
+ *
57
+ * const row = new ActionRowBuilder().addComponents(button);
58
+ *
59
+ * const message = await channel.send({ content: 'Click the button', components: [row] });
60
+ *
61
+ * // Remove onClick handler and destroy the interaction collector
62
+ * button.onClick(null);
63
+ * ```
64
+ */
65
65
  onClick(handler: CommandKitButtonBuilderInteractionCollectorDispatch, data?: CommandKitButtonBuilderInteractionCollectorDispatchContextData): this;
66
66
  onEnd(handler: CommandKitButtonBuilderOnEnd): this;
67
67
  /**
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
- */
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
+ */
72
72
  onError(handler: EventInterceptorErrorHandler): this;
73
73
  /**
74
- * Sets a filter for the interaction collector.
75
- * @param predicate The filter to use for the interaction collector
76
- */
74
+ * Sets a filter for the interaction collector.
75
+ * @param predicate The filter to use for the interaction collector
76
+ */
77
77
  filter(predicate: ButtonKitPredicate): this;
78
78
  private get customId();
79
79
  /**
80
- * Disposes of the button collector and cleans up resources.
81
- */
80
+ * Disposes of the button collector and cleans up resources.
81
+ */
82
82
  dispose(): this;
83
83
  }
84
84
  //#endregion
85
85
  export { CommandKitButtonBuilderOnEnd as a, CommandKitButtonBuilderInteractionCollectorDispatchContextData as i, ButtonKitPredicate as n, OnButtonKitClick as o, CommandKitButtonBuilderInteractionCollectorDispatch as r, OnButtonKitEnd as s, ButtonKit as t };
86
- //# sourceMappingURL=ButtonKit-DKu0VAe4.d.ts.map
86
+ //# sourceMappingURL=ButtonKit-BfcyvWfj.d.ts.map
@@ -1,5 +1,5 @@
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";
1
+ import { r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
2
+ import { a as OnSelectMenuKitSubmit, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-CCvvgnxi.js";
3
3
  import { ChannelSelectMenuBuilder, ChannelSelectMenuInteraction } from "discord.js";
4
4
 
5
5
  //#region src/components/interactive/select-menu/ChannelSelectMenuKit.d.ts
@@ -20,47 +20,47 @@ type ChannelSelectMenuKitPredicate = SelectMenuKitPredicate<ChannelSelectMenuInt
20
20
  declare class ChannelSelectMenuKit extends ChannelSelectMenuBuilder {
21
21
  #private;
22
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 ChannelSelectMenuKit()
30
- * .setTitle('My Modal')
31
- * .setCustomId('my-modal')
32
- * .filter((interaction) => interaction.Channel.id === '1234567890')
33
- * .onSelect(async (interaction) => {
34
- * await interaction.reply('You submitted the modal!');
35
- * })
36
- * .addComponents(actionRow1, actionRow2);
37
- * ```
38
- */
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 ChannelSelectMenuKit()
30
+ * .setTitle('My Modal')
31
+ * .setCustomId('my-modal')
32
+ * .filter((interaction) => interaction.Channel.id === '1234567890')
33
+ * .onSelect(async (interaction) => {
34
+ * await interaction.reply('You submitted the modal!');
35
+ * })
36
+ * .addComponents(actionRow1, actionRow2);
37
+ * ```
38
+ */
39
39
  onSelect(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch<ChannelSelectMenuInteraction, ChannelSelectMenuKit>, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData): this;
40
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
- */
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
45
  onEnd(handler: CommandKitSelectMenuBuilderOnEnd): this;
46
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
- */
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
51
  onError(handler: EventInterceptorErrorHandler): this;
52
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
- */
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
57
  filter(predicate: SelectMenuKitPredicate<ChannelSelectMenuInteraction>): this;
58
58
  private get customId();
59
59
  /**
60
- * Cleans up the interaction collector and removes the handler.
61
- */
60
+ * Cleans up the interaction collector and removes the handler.
61
+ */
62
62
  dispose(): this;
63
63
  }
64
64
  //#endregion
65
65
  export { ChannelSelectMenuKitPredicate as n, OnChannelSelectMenuKitSubmit as r, ChannelSelectMenuKit as t };
66
- //# sourceMappingURL=ChannelSelectMenuKit-HQZ4hH5s.d.ts.map
66
+ //# sourceMappingURL=ChannelSelectMenuKit-DYkudikb.d.ts.map
@@ -44,53 +44,53 @@ interface CommandsRouterOptions {
44
44
  declare class CommandsRouter {
45
45
  private readonly options;
46
46
  /**
47
- * @private
48
- * @internal
49
- */
47
+ * @private
48
+ * @internal
49
+ */
50
50
  private commands;
51
51
  /**
52
- * @private
53
- * @internal
54
- */
52
+ * @private
53
+ * @internal
54
+ */
55
55
  private middlewares;
56
56
  /**
57
- * Creates a new CommandsRouter instance.
58
- * @param options - Configuration options for the router
59
- */
57
+ * Creates a new CommandsRouter instance.
58
+ * @param options - Configuration options for the router
59
+ */
60
60
  constructor(options: CommandsRouterOptions);
61
61
  /**
62
- * Populates the router with existing command and middleware data.
63
- * @param data - Parsed command data to populate with
64
- */
62
+ * Populates the router with existing command and middleware data.
63
+ * @param data - Parsed command data to populate with
64
+ */
65
65
  populate(data: ParsedCommandData): void;
66
66
  /**
67
- * Checks if the configured entrypoint path exists.
68
- * @returns True if the path exists
69
- */
67
+ * Checks if the configured entrypoint path exists.
68
+ * @returns True if the path exists
69
+ */
70
70
  isValidPath(): boolean;
71
71
  /**
72
- * @private
73
- * @internal
74
- */
72
+ * @private
73
+ * @internal
74
+ */
75
75
  private isCommand;
76
76
  /**
77
- * @private
78
- * @internal
79
- */
77
+ * @private
78
+ * @internal
79
+ */
80
80
  private isMiddleware;
81
81
  /**
82
- * @private
83
- * @internal
84
- */
82
+ * @private
83
+ * @internal
84
+ */
85
85
  private isCategory;
86
86
  /**
87
- * Clears all loaded commands and middleware.
88
- */
87
+ * Clears all loaded commands and middleware.
88
+ */
89
89
  clear(): void;
90
90
  /**
91
- * Scans the filesystem for commands and middleware files.
92
- * @returns Parsed command data
93
- */
91
+ * Scans the filesystem for commands and middleware files.
92
+ * @returns Parsed command data
93
+ */
94
94
  scan(): Promise<{
95
95
  commands: {
96
96
  [k: string]: Command;
@@ -100,17 +100,17 @@ declare class CommandsRouter {
100
100
  };
101
101
  }>;
102
102
  /**
103
- * Gets the raw command and middleware collections.
104
- * @returns Object containing commands and middlewares collections
105
- */
103
+ * Gets the raw command and middleware collections.
104
+ * @returns Object containing commands and middlewares collections
105
+ */
106
106
  getData(): {
107
107
  commands: Collection<string, Command>;
108
108
  middlewares: Collection<string, Middleware>;
109
109
  };
110
110
  /**
111
- * Converts the loaded data to a JSON-serializable format.
112
- * @returns Plain object with commands and middlewares
113
- */
111
+ * Converts the loaded data to a JSON-serializable format.
112
+ * @returns Plain object with commands and middlewares
113
+ */
114
114
  toJSON(): {
115
115
  commands: {
116
116
  [k: string]: Command;
@@ -120,26 +120,26 @@ declare class CommandsRouter {
120
120
  };
121
121
  };
122
122
  /**
123
- * @private
124
- * @internal
125
- */
123
+ * @private
124
+ * @internal
125
+ */
126
126
  private traverse;
127
127
  /**
128
- * @private
129
- * @internal
130
- */
128
+ * @private
129
+ * @internal
130
+ */
131
131
  private handle;
132
132
  /**
133
- * @private
134
- * @internal
135
- */
133
+ * @private
134
+ * @internal
135
+ */
136
136
  private applyMiddlewares;
137
137
  /**
138
- * @private
139
- * @internal
140
- */
138
+ * @private
139
+ * @internal
140
+ */
141
141
  private replaceEntrypoint;
142
142
  }
143
143
  //#endregion
144
144
  export { ParsedCommandData as a, Middleware as i, CommandsRouter as n, CommandsRouterOptions as r, Command as t };
145
- //# sourceMappingURL=CommandsRouter-C7dZEepB.d.ts.map
145
+ //# sourceMappingURL=CommandsRouter-DiNoF0dq.d.ts.map
@@ -3,28 +3,28 @@ import { Awaitable, Client, ClientEvents } from "discord.js";
3
3
  //#region src/components/common/EventInterceptor.d.ts
4
4
  interface EventInterceptorContextData<E extends keyof ClientEvents> {
5
5
  /**
6
- * The filter to use for the collector.
7
- */
6
+ * The filter to use for the collector.
7
+ */
8
8
  filter?: (...args: ClientEvents[E]) => Awaitable<boolean>;
9
9
  /**
10
- * The duration (in ms) that the collector should run for.
11
- */
10
+ * The duration (in ms) that the collector should run for.
11
+ */
12
12
  time?: number;
13
13
  /**
14
- * If the collector should automatically reset the timer when a button is clicked.
15
- */
14
+ * If the collector should automatically reset the timer when a button is clicked.
15
+ */
16
16
  autoReset?: boolean;
17
17
  /**
18
- * Whether the collector should run only once.
19
- */
18
+ * Whether the collector should run only once.
19
+ */
20
20
  once?: boolean;
21
21
  /**
22
- * The handler to run when the collector ends.
23
- */
22
+ * The handler to run when the collector ends.
23
+ */
24
24
  onEnd?: (reason: string) => Awaitable<void>;
25
25
  /**
26
- * The handler to run upon an error.
27
- */
26
+ * The handler to run upon an error.
27
+ */
28
28
  onError?: EventInterceptorErrorHandler;
29
29
  }
30
30
  /**
@@ -42,50 +42,50 @@ declare class EventInterceptor {
42
42
  private globalHandlers;
43
43
  private cleanupTimer;
44
44
  /**
45
- * Creates the event interceptor.
46
- */
45
+ * Creates the event interceptor.
46
+ */
47
47
  constructor(client: Client);
48
48
  /**
49
- * Destroys the event interceptor.
50
- */
49
+ * Destroys the event interceptor.
50
+ */
51
51
  destroy(): void;
52
52
  /**
53
- * Whether the event has subscribers.
54
- * @param event The event to check.
55
- */
53
+ * Whether the event has subscribers.
54
+ * @param event The event to check.
55
+ */
56
56
  hasSubscribers(event: keyof ClientEvents): boolean;
57
57
  /**
58
- * Returns the number of subscribers for the event.
59
- * @param event The event to check.
60
- */
58
+ * Returns the number of subscribers for the event.
59
+ * @param event The event to check.
60
+ */
61
61
  getSubscriberCount(event: keyof ClientEvents): number;
62
62
  /**
63
- * Whether the event has global handlers.
64
- */
63
+ * Whether the event has global handlers.
64
+ */
65
65
  hasGlobalHandlers(): boolean;
66
66
  /**
67
- * Returns the number of global handlers.
68
- */
67
+ * Returns the number of global handlers.
68
+ */
69
69
  getGlobalHandlersCount(): number;
70
70
  /**
71
- * Subscribes to an event.
72
- * @param event The event to subscribe to.
73
- * @param listener The listener to call when the event is emitted.
74
- * @returns A function to unsubscribe from the event.
75
- */
71
+ * Subscribes to an event.
72
+ * @param event The event to subscribe to.
73
+ * @param listener The listener to call when the event is emitted.
74
+ * @returns A function to unsubscribe from the event.
75
+ */
76
76
  subscribe<Event extends keyof ClientEvents>(event: Event, listener: (...args: ClientEvents[Event]) => void, options?: EventInterceptorContextData<Event>): () => void;
77
77
  /**
78
- * Unsubscribes from an event.
79
- * @param event The event to unsubscribe from.
80
- */
78
+ * Unsubscribes from an event.
79
+ * @param event The event to unsubscribe from.
80
+ */
81
81
  unsubscribe<Event extends keyof ClientEvents>(event: Event, listener: (...args: ClientEvents[Event]) => void, reason?: string): void;
82
82
  /**
83
- * Creates a global handler for the event.
84
- * @param event The event to create a global handler for.
85
- * @returns The global handler.
86
- */
83
+ * Creates a global handler for the event.
84
+ * @param event The event to create a global handler for.
85
+ * @returns The global handler.
86
+ */
87
87
  private createGlobalHandler;
88
88
  }
89
89
  //#endregion
90
90
  export { EventInterceptorContextData as n, EventInterceptorErrorHandler as r, EventInterceptor as t };
91
- //# sourceMappingURL=EventInterceptor-CZmWpS08.d.ts.map
91
+ //# sourceMappingURL=EventInterceptor-D9JKMcfi.d.ts.map