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
@@ -1,14 +1,14 @@
1
- import { EventInterceptor } from "./EventInterceptor-x-R2qshQ.js";
2
- import { Fragment, createElement } from "./element-CvNhvLZ8.js";
3
- import { MaybeArray } from "./types-CJ-XvOFN.js";
4
- import { MessageCommandOptions, MessageCommandParser } from "./MessageCommandParser-DEOl_ifb.js";
5
- import { Command, CommandsRouter, Middleware } from "./CommandsRouter-CBdsqaWK.js";
6
- import { EventsRouter, ParsedEvent } from "./EventsRouter-4pT6vj-U.js";
7
- import { HMREventType } from "./constants-DqnSDZ6l.js";
1
+ import { t as EventInterceptor } from "./EventInterceptor-CZmWpS08.js";
2
+ import { a as Fragment, s as createElement } from "./element-wQo0heGj.js";
3
+ import { t as MaybeArray } from "./types-BywA9d2Z.js";
4
+ import { r as MessageCommandParser, t as MessageCommandOptions } from "./MessageCommandParser-q3dQcE5N.js";
5
+ import { i as Middleware, n as CommandsRouter, t as Command } from "./CommandsRouter-C7dZEepB.js";
6
+ import { i as ParsedEvent, t as EventsRouter } from "./EventsRouter-DZ37r54v.js";
7
+ import { o as HMREventType } from "./constants-CuYW0K10.js";
8
8
  import EventEmitter from "node:events";
9
9
  import { AutocompleteInteraction, Awaitable, CacheType, ChatInputCommandInteraction, Client, ClientEvents, Collection, Constructable, ContextMenuCommandBuilder, ContextMenuCommandInteraction, Guild, Interaction, Locale, Message, MessageContextMenuCommandInteraction, PermissionsString, RESTPostAPIApplicationCommandsJSONBody, SlashCommandBuilder, TextBasedChannel, UserContextMenuCommandInteraction } from "discord.js";
10
10
  import { DirectiveTransformerOptions } from "directive-to-hof";
11
- import { Options } from "tsdown";
11
+ import { InlineConfig } from "tsdown";
12
12
 
13
13
  //#region src/types.d.ts
14
14
  type Prettify<T> = { [K in keyof T]: T[K] } & {};
@@ -17,8 +17,8 @@ type Prettify<T> = { [K in keyof T]: T[K] } & {};
17
17
  */
18
18
  interface CommandKitOptions {
19
19
  /**
20
- * The Discord.js client object to use with CommandKit.
21
- */
20
+ * The Discord.js client object to use with CommandKit.
21
+ */
22
22
  client?: Client;
23
23
  }
24
24
  /**
@@ -26,16 +26,16 @@ interface CommandKitOptions {
26
26
  */
27
27
  interface CommandContext<T extends Interaction, Cached extends CacheType> {
28
28
  /**
29
- * The interaction that triggered this command.
30
- */
29
+ * The interaction that triggered this command.
30
+ */
31
31
  interaction: Interaction<CacheType>;
32
32
  /**
33
- * The client that instantiated this command.
34
- */
33
+ * The client that instantiated this command.
34
+ */
35
35
  client: Client;
36
36
  /**
37
- * The command data.
38
- */
37
+ * The command data.
38
+ */
39
39
  handler: CommandKit;
40
40
  }
41
41
  /**
@@ -43,24 +43,24 @@ interface CommandContext<T extends Interaction, Cached extends CacheType> {
43
43
  */
44
44
  interface CommandMetadata {
45
45
  /**
46
- * The guilds that the command is available in.
47
- */
46
+ * The guilds that the command is available in.
47
+ */
48
48
  guilds?: string[];
49
49
  /**
50
- * The aliases of the command.
51
- */
50
+ * The aliases of the command.
51
+ */
52
52
  aliases?: string[];
53
53
  /**
54
- * The user permissions required to execute the command.
55
- */
54
+ * The user permissions required to execute the command.
55
+ */
56
56
  userPermissions?: PermissionsString | PermissionsString[];
57
57
  /**
58
- * The bot permissions required to execute the command.
59
- */
58
+ * The bot permissions required to execute the command.
59
+ */
60
60
  botPermissions?: PermissionsString | PermissionsString[];
61
61
  /**
62
- * The name aliases for the `user` and `message` context menu commands. When i18n plugin is in use, this option will be ignored if the translation for the context menu command name is provided.
63
- */
62
+ * The name aliases for the `user` and `message` context menu commands. When i18n plugin is in use, this option will be ignored if the translation for the context menu command name is provided.
63
+ */
64
64
  nameAliases?: Record<'user' | 'message', string>;
65
65
  }
66
66
  /**
@@ -68,8 +68,8 @@ interface CommandMetadata {
68
68
  */
69
69
  type CommandData = Prettify<Omit<RESTPostAPIApplicationCommandsJSONBody, 'description'> & {
70
70
  /**
71
- * The description of the command.
72
- */
71
+ * The description of the command.
72
+ */
73
73
  description?: string;
74
74
  }>;
75
75
  /**
@@ -201,138 +201,138 @@ declare class Context<ExecutionMode extends CommandExecutionMode = CommandExecut
201
201
  readonly commandkit: CommandKit;
202
202
  protected readonly config: ContextParameters<ExecutionMode, Args>;
203
203
  /**
204
- * The interaction that triggered the command.
205
- */
204
+ * The interaction that triggered the command.
205
+ */
206
206
  readonly interaction: ContextParameters<ExecutionMode>['interaction'];
207
207
  /**
208
- * The message that triggered the command.
209
- */
208
+ * The message that triggered the command.
209
+ */
210
210
  readonly message: ContextParameters<ExecutionMode>['message'];
211
211
  /**
212
- * The guild where the command was triggered.
213
- */
212
+ * The guild where the command was triggered.
213
+ */
214
214
  readonly guild: Guild | null;
215
215
  /**
216
- * The guild ID where the command was triggered.
217
- */
216
+ * The guild ID where the command was triggered.
217
+ */
218
218
  readonly guildId: string | null;
219
219
  /**
220
- * The channel where the command was triggered.
221
- */
220
+ * The channel where the command was triggered.
221
+ */
222
222
  readonly channel: TextBasedChannel | null;
223
223
  /**
224
- * The channel id where the command was triggered.
225
- */
224
+ * The channel id where the command was triggered.
225
+ */
226
226
  readonly channelId: string | null;
227
227
  /**
228
- * The client instance.
229
- */
228
+ * The client instance.
229
+ */
230
230
  readonly client: Client;
231
231
  /**
232
- * The command that this context belongs to.
233
- */
232
+ * The command that this context belongs to.
233
+ */
234
234
  readonly command: LoadedCommand;
235
235
  /**
236
- * @private
237
- * @internal
238
- */
236
+ * @private
237
+ * @internal
238
+ */
239
239
  private _locale;
240
240
  /**
241
- * Creates a new command context.
242
- * @param commandkit The command kit instance.
243
- * @param config The context parameters.
244
- */
241
+ * Creates a new command context.
242
+ * @param commandkit The command kit instance.
243
+ * @param config The context parameters.
244
+ */
245
245
  constructor(commandkit: CommandKit, config: ContextParameters<ExecutionMode, Args>);
246
246
  /**
247
- * The shared key-value store for this context. This can be used to store data that needs to be shared between middlewares or commands.
248
- * This store is shared across all contexts in the same command execution, including the cloned contexts and middleware contexts.
249
- */
247
+ * The shared key-value store for this context. This can be used to store data that needs to be shared between middlewares or commands.
248
+ * This store is shared across all contexts in the same command execution, including the cloned contexts and middleware contexts.
249
+ */
250
250
  get store(): Collection<any, any>;
251
251
  /**
252
- * Gets the name of the current command.
253
- */
252
+ * Gets the name of the current command.
253
+ */
254
254
  get commandName(): string;
255
255
  /**
256
- * Gets the invoked command name (could be an alias for message commands)
257
- */
256
+ * Gets the invoked command name (could be an alias for message commands)
257
+ */
258
258
  get invokedCommandName(): string;
259
259
  /**
260
- * Gets the command options based on the execution mode.
261
- */
260
+ * Gets the command options based on the execution mode.
261
+ */
262
262
  get options(): CommandContextOptions<ExecutionMode>;
263
263
  /**
264
- * Whether this context was forwarded from another context. This happens when a command forwards its context to another command.
265
- */
264
+ * Whether this context was forwarded from another context. This happens when a command forwards its context to another command.
265
+ */
266
266
  get forwarded(): boolean;
267
267
  /**
268
- * Forwards the context to another command. The target handler will be the same as current handler.
269
- * @param command The command to forward to.
270
- */
268
+ * Forwards the context to another command. The target handler will be the same as current handler.
269
+ * @param command The command to forward to.
270
+ */
271
271
  forwardCommand<C extends ResolvableCommand>(command: C): Promise<never>;
272
272
  /**
273
- * The execution mode of the command.
274
- */
273
+ * The execution mode of the command.
274
+ */
275
275
  get executionMode(): ExecutionMode;
276
276
  /**
277
- * Whether the command was triggered by an interaction.
278
- */
277
+ * Whether the command was triggered by an interaction.
278
+ */
279
279
  isInteraction(): this is InteractionCommandContext;
280
280
  /**
281
- * Whether the command was triggered by a slash command interaction.
282
- */
281
+ * Whether the command was triggered by a slash command interaction.
282
+ */
283
283
  isChatInputCommand(): this is ChatInputCommandContext;
284
284
  /**
285
- * Whether the command was triggered by an autocomplete interaction.
286
- */
285
+ * Whether the command was triggered by an autocomplete interaction.
286
+ */
287
287
  isAutocomplete(): this is AutocompleteCommandContext;
288
288
  /**
289
- * Whether the command was triggered by a message context menu interaction.
290
- */
289
+ * Whether the command was triggered by a message context menu interaction.
290
+ */
291
291
  isMessageContextMenu(): this is MessageContextMenuCommandContext;
292
292
  /**
293
- * Whether the command was triggered by a user context menu interaction.
294
- */
293
+ * Whether the command was triggered by a user context menu interaction.
294
+ */
295
295
  isUserContextMenu(): this is UserContextMenuCommandContext;
296
296
  /**
297
- * Whether the command was triggered by a message.
298
- */
297
+ * Whether the command was triggered by a message.
298
+ */
299
299
  isMessage(): this is Context<'message'>;
300
300
  /**
301
- * Returns the command identifier.
302
- */
301
+ * Returns the command identifier.
302
+ */
303
303
  getCommandIdentifier(): string;
304
304
  /**
305
- * Returns the locale of the guild where this command was triggered.
306
- */
305
+ * Returns the locale of the guild where this command was triggered.
306
+ */
307
307
  getGuildLocale(): Locale | null;
308
308
  /**
309
- * Returns the locale of the user who triggered this command.
310
- */
309
+ * Returns the locale of the user who triggered this command.
310
+ */
311
311
  getUserLocale(): Locale | null;
312
312
  /**
313
- * Returns the locale for this command.
314
- * @param preferUser Whether to prefer the user's locale over the guild's locale.
315
- * @returns The locale for this command. If no locale is found, the default locale is returned.
316
- */
313
+ * Returns the locale for this command.
314
+ * @param preferUser Whether to prefer the user's locale over the guild's locale.
315
+ * @returns The locale for this command. If no locale is found, the default locale is returned.
316
+ */
317
317
  getLocale(preferUser?: boolean): Locale;
318
318
  /**
319
- * Sets the locale for this command.
320
- * @param locale The locale to set.
321
- */
319
+ * Sets the locale for this command.
320
+ * @param locale The locale to set.
321
+ */
322
322
  setLocale(locale: Locale | null): void;
323
323
  /**
324
- * Creates a clone of this context
325
- * @param config - Optional partial config to override in the clone
326
- */
324
+ * Creates a clone of this context
325
+ * @param config - Optional partial config to override in the clone
326
+ */
327
327
  clone(config?: Partial<ContextParameters<ExecutionMode>>): Context<ExecutionMode>;
328
328
  /**
329
- * Checks if this context is a middleware context.
330
- */
329
+ * Checks if this context is a middleware context.
330
+ */
331
331
  isMiddleware(): this is MiddlewareContext<ExecutionMode>;
332
332
  /**
333
- * Gets the command arguments (only available for message commands).
334
- * @returns Array of command arguments
335
- */
333
+ * Gets the command arguments (only available for message commands).
334
+ * @returns Array of command arguments
335
+ */
336
336
  args(): string[];
337
337
  }
338
338
  /**
@@ -340,14 +340,14 @@ declare class Context<ExecutionMode extends CommandExecutionMode = CommandExecut
340
340
  */
341
341
  declare class MiddlewareContext<T extends CommandExecutionMode = CommandExecutionMode> extends Context<T, MiddlewareContextArgs> {
342
342
  /**
343
- * Sets command runner function to wrap the command execution.
344
- * @param fn The function to set.
345
- * @example ctx.setCommandRunner(async (execute) => {
346
- * // do something before command execution
347
- * await execute();
348
- * // do something after command execution
349
- * })
350
- */
343
+ * Sets command runner function to wrap the command execution.
344
+ * @param fn The function to set.
345
+ * @example ctx.setCommandRunner(async (execute) => {
346
+ * // do something before command execution
347
+ * await execute();
348
+ * // do something after command execution
349
+ * })
350
+ */
351
351
  setCommandRunner(fn: RunCommand): void;
352
352
  }
353
353
  //#endregion
@@ -365,36 +365,36 @@ interface PreRegisterCommandsEvent {
365
365
  declare class CommandRegistrar {
366
366
  readonly commandkit: CommandKit;
367
367
  /**
368
- * @private
369
- * @internal
370
- */
368
+ * @private
369
+ * @internal
370
+ */
371
371
  private api;
372
372
  /**
373
- * Creates an instance of CommandRegistrar.
374
- * @param commandkit The commandkit instance.
375
- */
373
+ * Creates an instance of CommandRegistrar.
374
+ * @param commandkit The commandkit instance.
375
+ */
376
376
  constructor(commandkit: CommandKit);
377
377
  /**
378
- * Gets the commands data.
379
- */
378
+ * Gets the commands data.
379
+ */
380
380
  getCommandsData(): (CommandData & {
381
381
  __metadata?: CommandMetadata;
382
382
  __applyId(id: string): void;
383
383
  })[];
384
384
  /**
385
- * Registers loaded commands.
386
- */
385
+ * Registers loaded commands.
386
+ */
387
387
  register(): Promise<void>;
388
388
  /**
389
- * Updates the global commands.
390
- */
389
+ * Updates the global commands.
390
+ */
391
391
  updateGlobalCommands(commands: (CommandData & {
392
392
  __metadata?: CommandMetadata;
393
393
  __applyId(id: string): void;
394
394
  })[]): Promise<void>;
395
395
  /**
396
- * Updates the guild commands.
397
- */
396
+ * Updates the guild commands.
397
+ */
398
398
  updateGuildCommands(commands: (CommandData & {
399
399
  __metadata?: CommandMetadata;
400
400
  __applyId(id: string): void;
@@ -407,46 +407,46 @@ declare class CommandRegistrar {
407
407
  */
408
408
  interface CommandKitEnvironmentInternalData {
409
409
  /**
410
- * The error that occurred during command execution, if any.
411
- * This is set when an error occurs during the execution of a command.
412
- */
410
+ * The error that occurred during command execution, if any.
411
+ * This is set when an error occurs during the execution of a command.
412
+ */
413
413
  executionError: Error | null;
414
414
  /**
415
- * The type of the environment, which can be used to differentiate between
416
- * different execution contexts (e.g., command handler, event handler, etc.).
417
- */
415
+ * The type of the environment, which can be used to differentiate between
416
+ * different execution contexts (e.g., command handler, event handler, etc.).
417
+ */
418
418
  type: CommandKitEnvironmentType | null;
419
419
  /**
420
- * A map of variables that can be used to store and retrieve data during command execution.
421
- * This allows for sharing data between different parts of the command execution process.
422
- */
420
+ * A map of variables that can be used to store and retrieve data during command execution.
421
+ * This allows for sharing data between different parts of the command execution process.
422
+ */
423
423
  variables: Map<string, any>;
424
424
  /**
425
- * A map of deferred functions that will be executed after the command has finished executing.
426
- * This is useful for running cleanup tasks or additional processing after the main command logic.
427
- */
425
+ * A map of deferred functions that will be executed after the command has finished executing.
426
+ * This is useful for running cleanup tasks or additional processing after the main command logic.
427
+ */
428
428
  deferredFunctions: Map<string, GenericFunction<[CommandKitEnvironment]>>;
429
429
  /**
430
- * A marker string that can be used to identify the command execution.
431
- * This is useful for logging and debugging purposes.
432
- */
430
+ * A marker string that can be used to identify the command execution.
431
+ * This is useful for logging and debugging purposes.
432
+ */
433
433
  marker: string;
434
434
  /**
435
- * The start time of the command execution.
436
- */
435
+ * The start time of the command execution.
436
+ */
437
437
  markStart: number;
438
438
  /**
439
- * The end time of the command execution.
440
- */
439
+ * The end time of the command execution.
440
+ */
441
441
  markEnd: number;
442
442
  /**
443
- * The context associated with the command execution.
444
- * This can be used to access request-specific data or application state.
445
- */
443
+ * The context associated with the command execution.
444
+ * This can be used to access request-specific data or application state.
445
+ */
446
446
  context: Context | null;
447
447
  /**
448
- * Shared collection instance for arbitrary data storage
449
- */
448
+ * Shared collection instance for arbitrary data storage
449
+ */
450
450
  store: Collection<any, any>;
451
451
  }
452
452
  /**
@@ -456,92 +456,92 @@ declare class CommandKitEnvironment {
456
456
  #private;
457
457
  readonly commandkit: CommandKit;
458
458
  /**
459
- * Creates the commandkit execution environment.
460
- * @param commandkit - The commandkit instance.
461
- */
459
+ * Creates the commandkit execution environment.
460
+ * @param commandkit - The commandkit instance.
461
+ */
462
462
  constructor(commandkit: CommandKit);
463
463
  /**
464
- * Set the context.
465
- * @param context - The context to set.
466
- */
464
+ * Set the context.
465
+ * @param context - The context to set.
466
+ */
467
467
  setContext(context: Context): void;
468
468
  /**
469
- * Get the context. `null` if not set.
470
- * @internal
471
- */
469
+ * Get the context. `null` if not set.
470
+ * @internal
471
+ */
472
472
  get context(): Context | null;
473
473
  /**
474
- * Get the execution error.
475
- * @internal
476
- */
474
+ * Get the execution error.
475
+ * @internal
476
+ */
477
477
  getExecutionError(): Error | null;
478
478
  /**
479
- * Set the execution error.
480
- * @param error - The error to set.
481
- * @internal
482
- */
479
+ * Set the execution error.
480
+ * @param error - The error to set.
481
+ * @internal
482
+ */
483
483
  setExecutionError(error: Error): void;
484
484
  /**
485
- * Get the environment type.
486
- */
485
+ * Get the environment type.
486
+ */
487
487
  getType(): CommandKitEnvironmentType;
488
488
  /**
489
- * Set the environment type.
490
- * @param type - The environment type to set.
491
- * @internal
492
- */
489
+ * Set the environment type.
490
+ * @param type - The environment type to set.
491
+ * @internal
492
+ */
493
493
  setType(type: CommandKitEnvironmentType): void;
494
494
  /**
495
- * The variables store for this environment.
496
- */
495
+ * The variables store for this environment.
496
+ */
497
497
  get variables(): Map<string, any>;
498
498
  /**
499
- * The shared store for this environment
500
- */
499
+ * The shared store for this environment
500
+ */
501
501
  get store(): Collection<any, any>;
502
502
  /**
503
- * Register a deferred function.
504
- * @param fn - The deferred function to register.
505
- * @returns The deferred function id.
506
- * @internal
507
- */
503
+ * Register a deferred function.
504
+ * @param fn - The deferred function to register.
505
+ * @returns The deferred function id.
506
+ * @internal
507
+ */
508
508
  registerDeferredFunction(fn: GenericFunction<[CommandKitEnvironment]>): string;
509
509
  /**
510
- * Clear a deferred function by id.
511
- * @param id - The deferred function id to clear.
512
- * @internal
513
- */
510
+ * Clear a deferred function by id.
511
+ * @param id - The deferred function id to clear.
512
+ * @internal
513
+ */
514
514
  clearDeferredFunction(id: string): void;
515
515
  /**
516
- * Run all deferred functions sequentially.
517
- * @internal
518
- */
516
+ * Run all deferred functions sequentially.
517
+ * @internal
518
+ */
519
519
  runDeferredFunctions(): Promise<void>;
520
520
  /**
521
- * Clear all deferred functions.
522
- * @internal
523
- */
521
+ * Clear all deferred functions.
522
+ * @internal
523
+ */
524
524
  clearAllDeferredFunctions(): void;
525
525
  /**
526
- * Mark the start of a command execution.
527
- * @param marker - The marker to set.
528
- * @internal
529
- */
526
+ * Mark the start of a command execution.
527
+ * @param marker - The marker to set.
528
+ * @internal
529
+ */
530
530
  markStart(marker: string): void;
531
531
  /**
532
- * Mark the end of a command execution.
533
- * @internal
534
- */
532
+ * Mark the end of a command execution.
533
+ * @internal
534
+ */
535
535
  markEnd(): void;
536
536
  /**
537
- * Get the marker.
538
- * @internal
539
- */
537
+ * Get the marker.
538
+ * @internal
539
+ */
540
540
  getMarker(): string;
541
541
  /**
542
- * Get the execution time in milliseconds.
543
- * @internal
544
- */
542
+ * Get the execution time in milliseconds.
543
+ * @internal
544
+ */
545
545
  getExecutionTime(): number;
546
546
  }
547
547
  declare enum CommandKitEnvironmentType {
@@ -640,17 +640,17 @@ declare function useStore(): Collection<any, any>;
640
640
  */
641
641
  interface RunCommandOptions {
642
642
  /**
643
- * The handler to use for executing the command.
644
- * If not provided, the execution mode will determine the handler.
645
- * For example, 'chatInputCommand', 'message', etc.
646
- */
643
+ * The handler to use for executing the command.
644
+ * If not provided, the execution mode will determine the handler.
645
+ * For example, 'chatInputCommand', 'message', etc.
646
+ */
647
647
  handler?: string;
648
648
  /**
649
- * Whether to throw an error if the command execution fails.
650
- * If true, any error during execution will be thrown.
651
- * Default is false, which means errors will be logged but not thrown.
652
- * @default false
653
- */
649
+ * Whether to throw an error if the command execution fails.
650
+ * If true, any error during execution will be thrown.
651
+ * Default is false, which means errors will be logged but not thrown.
652
+ * @default false
653
+ */
654
654
  throwOnError?: boolean;
655
655
  }
656
656
  /**
@@ -661,23 +661,23 @@ declare class AppCommandRunner {
661
661
  #private;
662
662
  private handler;
663
663
  /**
664
- * Creates a new AppCommandRunner instance.
665
- * @param handler - The app command handler instance to use for command execution
666
- */
664
+ * Creates a new AppCommandRunner instance.
665
+ * @param handler - The app command handler instance to use for command execution
666
+ */
667
667
  constructor(handler: AppCommandHandler);
668
668
  /**
669
- * Executes a prepared command with middleware support and environment setup.
670
- * Handles the complete command lifecycle including before/after middleware execution.
671
- * @param prepared - The prepared command execution data
672
- * @param source - The source interaction or message that triggered the command
673
- * @param options - The options for running the command
674
- */
669
+ * Executes a prepared command with middleware support and environment setup.
670
+ * Handles the complete command lifecycle including before/after middleware execution.
671
+ * @param prepared - The prepared command execution data
672
+ * @param source - The source interaction or message that triggered the command
673
+ * @param options - The options for running the command
674
+ */
675
675
  runCommand(prepared: PreparedAppCommandExecution, source: Interaction | Message, options?: RunCommandOptions): Promise<any>;
676
676
  /**
677
- * Determines the execution mode based on the source of the command.
678
- * @param source - The interaction or message that triggered the command
679
- * @returns The appropriate command execution mode
680
- */
677
+ * Determines the execution mode based on the source of the command.
678
+ * @param source - The interaction or message that triggered the command
679
+ * @returns The appropriate command execution mode
680
+ */
681
681
  getExecutionMode(source: Interaction | Message): CommandExecutionMode;
682
682
  }
683
683
  //#endregion
@@ -726,21 +726,21 @@ interface AppCommandMiddleware {
726
726
  */
727
727
  interface LoadedCommand {
728
728
  /**
729
- * The associated discord snowflake id for this command.
730
- * If the information is not yet available, this will be `null`.
731
- */
729
+ * The associated discord snowflake id for this command.
730
+ * If the information is not yet available, this will be `null`.
731
+ */
732
732
  discordId: string | null;
733
733
  /**
734
- * The command data.
735
- */
734
+ * The command data.
735
+ */
736
736
  command: Command;
737
737
  /**
738
- * The metadata for this command.
739
- */
738
+ * The metadata for this command.
739
+ */
740
740
  metadata: CommandMetadata;
741
741
  /**
742
- * The data for this command.
743
- */
742
+ * The data for this command.
743
+ */
744
744
  data: AppCommand;
745
745
  }
746
746
  /**
@@ -805,118 +805,118 @@ type CommandDataSchemaValue = CommandDataSchema[CommandDataSchemaKey];
805
805
  declare class AppCommandHandler {
806
806
  readonly commandkit: CommandKit;
807
807
  /**
808
- * @private
809
- * @internal
810
- */
808
+ * @private
809
+ * @internal
810
+ */
811
811
  private loadedCommands;
812
812
  /**
813
- * @private
814
- * @internal
815
- */
813
+ * @private
814
+ * @internal
815
+ */
816
816
  private loadedMiddlewares;
817
817
  /**
818
- * Command registrar for handling Discord API registration.
819
- */
818
+ * Command registrar for handling Discord API registration.
819
+ */
820
820
  readonly registrar: CommandRegistrar;
821
821
  /**
822
- * @private
823
- * @internal
824
- */
822
+ * @private
823
+ * @internal
824
+ */
825
825
  private onInteraction;
826
826
  /**
827
- * @private
828
- * @internal
829
- */
827
+ * @private
828
+ * @internal
829
+ */
830
830
  private onMessageCreate;
831
831
  /**
832
- * Command runner instance for executing commands.
833
- */
832
+ * Command runner instance for executing commands.
833
+ */
834
834
  readonly commandRunner: AppCommandRunner;
835
835
  /**
836
- * External command data storage.
837
- */
836
+ * External command data storage.
837
+ */
838
838
  readonly externalCommandData: Collection<string, Command>;
839
839
  /**
840
- * External middleware data storage.
841
- */
840
+ * External middleware data storage.
841
+ */
842
842
  readonly externalMiddlewareData: Collection<string, Middleware>;
843
843
  /**
844
- * Creates a new AppCommandHandler instance.
845
- * @param commandkit - The CommandKit instance
846
- */
844
+ * Creates a new AppCommandHandler instance.
845
+ * @param commandkit - The CommandKit instance
846
+ */
847
847
  constructor(commandkit: CommandKit);
848
848
  /**
849
- * Prints a formatted banner showing all loaded commands organized by category.
850
- */
849
+ * Prints a formatted banner showing all loaded commands organized by category.
850
+ */
851
851
  printBanner(): void;
852
852
  /**
853
- * Gets an array of all loaded commands.
854
- * @returns Array of loaded commands
855
- */
853
+ * Gets an array of all loaded commands.
854
+ * @returns Array of loaded commands
855
+ */
856
856
  getCommandsArray(): LoadedCommand[];
857
857
  /**
858
- * Registers event handlers for Discord interactions and messages.
859
- */
858
+ * Registers event handlers for Discord interactions and messages.
859
+ */
860
860
  registerCommandHandler(): void;
861
861
  /**
862
- * Prepares a command for execution by resolving the command and its middleware.
863
- * @param source - The interaction or message that triggered the command
864
- * @param cmdName - Optional command name override
865
- * @returns Prepared command execution data or null if command not found
866
- */
862
+ * Prepares a command for execution by resolving the command and its middleware.
863
+ * @param source - The interaction or message that triggered the command
864
+ * @param cmdName - Optional command name override
865
+ * @returns Prepared command execution data or null if command not found
866
+ */
867
867
  prepareCommandRun(source: Interaction | Message, cmdName?: string): Promise<PreparedAppCommandExecution | null>;
868
868
  /**
869
- * Finds a command by name.
870
- * @param name - The command name to search for
871
- * @param hint - The hint for the command type (user or message)
872
- * @returns The loaded command or null if not found
873
- */
869
+ * Finds a command by name.
870
+ * @param name - The command name to search for
871
+ * @param hint - The hint for the command type (user or message)
872
+ * @returns The loaded command or null if not found
873
+ */
874
874
  private findCommandByName;
875
875
  resolveMessageCommandName(name: string): string;
876
876
  /**
877
- * Reloads all commands and middleware from scratch.
878
- */
877
+ * Reloads all commands and middleware from scratch.
878
+ */
879
879
  reloadCommands(): Promise<void>;
880
880
  /**
881
- * Adds external middleware data to be loaded.
882
- * @param data - Array of middleware data to add
883
- */
881
+ * Adds external middleware data to be loaded.
882
+ * @param data - Array of middleware data to add
883
+ */
884
884
  addExternalMiddleware(data: Middleware[]): Promise<void>;
885
885
  /**
886
- * Adds external command data to be loaded.
887
- * @param data - Array of command data to add
888
- */
886
+ * Adds external command data to be loaded.
887
+ * @param data - Array of command data to add
888
+ */
889
889
  addExternalCommands(data: Command[]): Promise<void>;
890
890
  /**
891
- * Registers externally loaded middleware.
892
- * @param data - Array of loaded middleware to register
893
- */
891
+ * Registers externally loaded middleware.
892
+ * @param data - Array of loaded middleware to register
893
+ */
894
894
  registerExternalLoadedMiddleware(data: LoadedMiddleware[]): Promise<void>;
895
895
  /**
896
- * Registers externally loaded commands.
897
- * @param data - Array of loaded commands to register
898
- */
896
+ * Registers externally loaded commands.
897
+ * @param data - Array of loaded commands to register
898
+ */
899
899
  registerExternalLoadedCommands(data: LoadedCommand[]): Promise<void>;
900
900
  /**
901
- * Loads all commands and middleware from the router.
902
- */
901
+ * Loads all commands and middleware from the router.
902
+ */
903
903
  loadCommands(): Promise<void>;
904
904
  /**
905
- * @private
906
- * @internal
907
- */
905
+ * @private
906
+ * @internal
907
+ */
908
908
  private loadMiddleware;
909
909
  /**
910
- * @private
911
- * @internal
912
- */
910
+ * @private
911
+ * @internal
912
+ */
913
913
  private loadCommand;
914
914
  /**
915
- * Gets the metadata for a command.
916
- * @param command - The command name to get metadata for
917
- * @param hint - The hint for the command type (user or message)
918
- * @returns The command metadata or null if not found
919
- */
915
+ * Gets the metadata for a command.
916
+ * @param command - The command name to get metadata for
917
+ * @param hint - The hint for the command type (user or message)
918
+ * @returns The command metadata or null if not found
919
+ */
920
920
  getMetadataFor(command: string, hint?: 'user' | 'message'): CommandMetadata | null;
921
921
  }
922
922
  //#endregion
@@ -934,18 +934,18 @@ declare class CommandKitEventsChannel {
934
934
  readonly commandkit: CommandKit;
935
935
  private emitter;
936
936
  /**
937
- * Creates a new instance of CommandKitEventsChannel.
938
- * @param commandkit The CommandKit instance that this channel belongs to.
939
- */
937
+ * Creates a new instance of CommandKitEventsChannel.
938
+ * @param commandkit The CommandKit instance that this channel belongs to.
939
+ */
940
940
  constructor(commandkit: CommandKit);
941
941
  /**
942
- * Creates a namespaced event channel. This allows you to manage events
943
- * within a specific namespace, preventing conflicts with other event channels.
944
- * This is useful for organizing events related to different parts of your application.
945
- * @param namespace The namespace for the event channel.
946
- * @returns An object containing methods for managing events within the namespace.
947
- * @example commandkit.events.to('customNamespace').emit('eventName', data);
948
- */
942
+ * Creates a namespaced event channel. This allows you to manage events
943
+ * within a specific namespace, preventing conflicts with other event channels.
944
+ * This is useful for organizing events related to different parts of your application.
945
+ * @param namespace The namespace for the event channel.
946
+ * @returns An object containing methods for managing events within the namespace.
947
+ * @example commandkit.events.to('customNamespace').emit('eventName', data);
948
+ */
949
949
  to(namespace: string): {
950
950
  on: (event: string, listener: ListenerFunction) => void;
951
951
  off: (event: string, listener: ListenerFunction) => void;
@@ -954,40 +954,40 @@ declare class CommandKitEventsChannel {
954
954
  removeAllListeners: (event: string) => void;
955
955
  };
956
956
  /**
957
- * Register an event listener for a specific event within the namespace.
958
- * @param namespace The namespace for the event channel.
959
- * @param event The name of the event to listen for.
960
- * @param listener The function to call when the event is emitted.
961
- */
957
+ * Register an event listener for a specific event within the namespace.
958
+ * @param namespace The namespace for the event channel.
959
+ * @param event The name of the event to listen for.
960
+ * @param listener The function to call when the event is emitted.
961
+ */
962
962
  on(namespace: string, event: string, listener: ListenerFunction): void;
963
963
  /**
964
- * Unregister an event listener for a specific event within the namespace.
965
- * @param namespace The namespace for the event channel.
966
- * @param event The name of the event to stop listening for.
967
- * @param listener The function that was registered as the listener.
968
- */
964
+ * Unregister an event listener for a specific event within the namespace.
965
+ * @param namespace The namespace for the event channel.
966
+ * @param event The name of the event to stop listening for.
967
+ * @param listener The function that was registered as the listener.
968
+ */
969
969
  off(namespace: string, event: string, listener: ListenerFunction): void;
970
970
  /**
971
- * Register an event listener that will be called only once for a specific event
972
- * within the namespace.
973
- * @param namespace The namespace for the event channel.
974
- * @param event The name of the event to listen for.
975
- * @param listener The function to call when the event is emitted.
976
- */
971
+ * Register an event listener that will be called only once for a specific event
972
+ * within the namespace.
973
+ * @param namespace The namespace for the event channel.
974
+ * @param event The name of the event to listen for.
975
+ * @param listener The function to call when the event is emitted.
976
+ */
977
977
  once(namespace: string, event: string, listener: ListenerFunction): void;
978
978
  /**
979
- * Emit an event within the specified namespace, calling all registered listeners.
980
- * @param namespace The namespace for the event channel.
981
- * @param event The name of the event to emit.
982
- * @param args The arguments to pass to the listeners.
983
- * @returns A boolean indicating whether any listeners were called.
984
- */
979
+ * Emit an event within the specified namespace, calling all registered listeners.
980
+ * @param namespace The namespace for the event channel.
981
+ * @param event The name of the event to emit.
982
+ * @param args The arguments to pass to the listeners.
983
+ * @returns A boolean indicating whether any listeners were called.
984
+ */
985
985
  emit(namespace: string, event: string, ...args: any[]): boolean;
986
986
  /**
987
- * Remove all listeners for a specific event or all events within the namespace.
988
- * @param namespace The namespace for the event channel.
989
- * @param event The name of the event to remove listeners for. If not provided, all listeners for all events in the namespace will be removed.
990
- */
987
+ * Remove all listeners for a specific event or all events within the namespace.
988
+ * @param namespace The namespace for the event channel.
989
+ * @param event The name of the event to remove listeners for. If not provided, all listeners for all events in the namespace will be removed.
990
+ */
991
991
  removeAllListeners(namespace: string): void;
992
992
  removeAllListeners(namespace: string, event: string): void;
993
993
  }
@@ -999,6 +999,7 @@ declare class CommandKitEventsChannel {
999
999
  type EventListener = {
1000
1000
  handler: ListenerFunction;
1001
1001
  once: boolean;
1002
+ parallel: boolean;
1002
1003
  };
1003
1004
  /**
1004
1005
  * Represents a loaded event with all its listeners.
@@ -1027,39 +1028,39 @@ interface AppEventsHandlerLoadedData {
1027
1028
  declare class AppEventsHandler {
1028
1029
  readonly commandkit: CommandKit;
1029
1030
  /**
1030
- * @private
1031
- * @internal
1032
- */
1031
+ * @private
1032
+ * @internal
1033
+ */
1033
1034
  private loadedEvents;
1034
1035
  /**
1035
- * Creates a new AppEventsHandler instance.
1036
- * @param commandkit - The CommandKit instance
1037
- */
1036
+ * Creates a new AppEventsHandler instance.
1037
+ * @param commandkit - The CommandKit instance
1038
+ */
1038
1039
  constructor(commandkit: CommandKit);
1039
1040
  /**
1040
- * Gets information about all loaded events.
1041
- * @returns Array of loaded event data
1042
- */
1041
+ * Gets information about all loaded events.
1042
+ * @returns Array of loaded event data
1043
+ */
1043
1044
  getEvents(): AppEventsHandlerLoadedData[];
1044
1045
  /**
1045
- * Reloads all events by unregistering existing ones and loading them again.
1046
- */
1046
+ * Reloads all events by unregistering existing ones and loading them again.
1047
+ */
1047
1048
  reloadEvents(): Promise<void>;
1048
1049
  /**
1049
- * Loads all events from the events router and registers them with Discord.js client.
1050
- */
1050
+ * Loads all events from the events router and registers them with Discord.js client.
1051
+ */
1051
1052
  loadEvents(): Promise<void>;
1052
1053
  /**
1053
- * Unregisters all event listeners and clears loaded events.
1054
- */
1054
+ * Unregisters all event listeners and clears loaded events.
1055
+ */
1055
1056
  unregisterAll(): void;
1056
1057
  /**
1057
- * Registers all loaded events with the Discord.js client and CommandKit event system.
1058
- */
1058
+ * Registers all loaded events with the Discord.js client and CommandKit event system.
1059
+ */
1059
1060
  registerAllClientEvents(): void;
1060
1061
  /**
1061
- * Unregisters all client event listeners and cleans up loaded events.
1062
- */
1062
+ * Unregisters all client event listeners and cleans up loaded events.
1063
+ */
1063
1064
  unregisterAllClientListeners(): void;
1064
1065
  }
1065
1066
  //#endregion
@@ -1069,16 +1070,16 @@ declare class AppEventsHandler {
1069
1070
  */
1070
1071
  interface IpcMessageCommand {
1071
1072
  /**
1072
- * The type of HMR event being communicated.
1073
- */
1073
+ * The type of HMR event being communicated.
1074
+ */
1074
1075
  event: HMREventType;
1075
1076
  /**
1076
- * The path associated with the HMR event.
1077
- */
1077
+ * The path associated with the HMR event.
1078
+ */
1078
1079
  path: string;
1079
1080
  /**
1080
- * An optional identifier for the HMR event, used for acknowledgment.
1081
- */
1081
+ * An optional identifier for the HMR event, used for acknowledgment.
1082
+ */
1082
1083
  id?: string;
1083
1084
  }
1084
1085
  /**
@@ -1086,22 +1087,22 @@ interface IpcMessageCommand {
1086
1087
  */
1087
1088
  interface CommandKitHMREvent {
1088
1089
  /**
1089
- * The type of HMR event.
1090
- */
1090
+ * The type of HMR event.
1091
+ */
1091
1092
  event: HMREventType;
1092
1093
  /**
1093
- * The path associated with the HMR event.
1094
- */
1094
+ * The path associated with the HMR event.
1095
+ */
1095
1096
  path: string;
1096
1097
  /**
1097
- * Accepts the HMR event, indicating that it has been handled.
1098
- * This prevents further processing of the event.
1099
- */
1098
+ * Accepts the HMR event, indicating that it has been handled.
1099
+ * This prevents further processing of the event.
1100
+ */
1100
1101
  accept: () => void;
1101
1102
  /**
1102
- * Prevents the default action for the HMR event.
1103
- * This can be used to stop further processing of the event.
1104
- */
1103
+ * Prevents the default action for the HMR event.
1104
+ * This can be used to stop further processing of the event.
1105
+ */
1105
1106
  preventDefault: () => void;
1106
1107
  }
1107
1108
  /**
@@ -1118,106 +1119,106 @@ declare abstract class RuntimePlugin<T extends PluginOptions = PluginOptions> ex
1118
1119
  readonly type = PluginType.Runtime;
1119
1120
  readonly preload: Set<string>;
1120
1121
  /**
1121
- * Called before commands are loaded
1122
- */
1122
+ * Called before commands are loaded
1123
+ */
1123
1124
  onBeforeCommandsLoad(ctx: CommandKitPluginRuntime): Promise<void>;
1124
1125
  /**
1125
- * Called after commands are loaded
1126
- */
1126
+ * Called after commands are loaded
1127
+ */
1127
1128
  onAfterCommandsLoad(ctx: CommandKitPluginRuntime): Promise<void>;
1128
1129
  /**
1129
- * Called before events are loaded
1130
- */
1130
+ * Called before events are loaded
1131
+ */
1131
1132
  onBeforeEventsLoad(ctx: CommandKitPluginRuntime): Promise<void>;
1132
1133
  /**
1133
- * Called after events are loaded
1134
- */
1134
+ * Called after events are loaded
1135
+ */
1135
1136
  onAfterEventsLoad(ctx: CommandKitPluginRuntime): Promise<void>;
1136
1137
  /**
1137
- * Called before the client logs in
1138
- */
1138
+ * Called before the client logs in
1139
+ */
1139
1140
  onBeforeClientLogin(ctx: CommandKitPluginRuntime): Promise<void>;
1140
1141
  /**
1141
- * Called after the client logs in
1142
- */
1142
+ * Called after the client logs in
1143
+ */
1143
1144
  onAfterClientLogin(ctx: CommandKitPluginRuntime): Promise<void>;
1144
1145
  /**
1145
- * Called before interaction is handled
1146
- * @param interaction The interaction
1147
- */
1146
+ * Called before interaction is handled
1147
+ * @param interaction The interaction
1148
+ */
1148
1149
  onBeforeInteraction(ctx: CommandKitPluginRuntime, interaction: Interaction): Promise<void>;
1149
1150
  /**
1150
- * Called before message command is processed
1151
- * @param message The message
1152
- */
1151
+ * Called before message command is processed
1152
+ * @param message The message
1153
+ */
1153
1154
  onBeforeMessageCommand(ctx: CommandKitPluginRuntime, message: Message): Promise<void>;
1154
1155
  /**
1155
- * Called before command is executed. This method can execute the command itself.
1156
- * @param source The source that triggered the command
1157
- * @param command The command
1158
- * @param execute The function that executes the command
1159
- */
1156
+ * Called before command is executed. This method can execute the command itself.
1157
+ * @param source The source that triggered the command
1158
+ * @param command The command
1159
+ * @param execute The function that executes the command
1160
+ */
1160
1161
  executeCommand(ctx: CommandKitPluginRuntime, env: CommandKitEnvironment, source: Interaction | Message, command: PreparedAppCommandExecution, execute: () => Promise<any>): Promise<boolean>;
1161
1162
  /**
1162
- * Called after events router is initialized
1163
- * @param ctx The context
1164
- */
1163
+ * Called after events router is initialized
1164
+ * @param ctx The context
1165
+ */
1165
1166
  onEventsRouterInit(ctx: CommandKitPluginRuntime): Promise<void>;
1166
1167
  /**
1167
- * Called after commands router is initialized
1168
- * @param ctx The context
1169
- */
1168
+ * Called after commands router is initialized
1169
+ * @param ctx The context
1170
+ */
1170
1171
  onCommandsRouterInit(ctx: CommandKitPluginRuntime): Promise<void>;
1171
1172
  /**
1172
- * Called when HMR event is received
1173
- * @param ctx The context
1174
- * @param event The event
1175
- */
1173
+ * Called when HMR event is received
1174
+ * @param ctx The context
1175
+ * @param event The event
1176
+ */
1176
1177
  performHMR(ctx: CommandKitPluginRuntime, event: CommandKitHMREvent): Promise<void>;
1177
1178
  /**
1178
- * Called before command is loaded for registration. This method can be used to modify the command data before it is loaded.
1179
- * @param ctx The context
1180
- * @param commands The command that is being loaded. This is a CommandBuilderLike object which represents Discord's command
1181
- */
1179
+ * Called before command is loaded for registration. This method can be used to modify the command data before it is loaded.
1180
+ * @param ctx The context
1181
+ * @param commands The command that is being loaded. This is a CommandBuilderLike object which represents Discord's command
1182
+ */
1182
1183
  prepareCommand(ctx: CommandKitPluginRuntime, commands: CommandBuilderLike): Promise<CommandBuilderLike | null>;
1183
1184
  /**
1184
- * Called before command is registered to discord. This method can cancel the registration of the command and handle it manually.
1185
- * @param ctx The context
1186
- * @param data The command registration data
1187
- */
1185
+ * Called before command is registered to discord. This method can cancel the registration of the command and handle it manually.
1186
+ * @param ctx The context
1187
+ * @param data The command registration data
1188
+ */
1188
1189
  onBeforeRegisterCommands(ctx: CommandKitPluginRuntime, event: PreRegisterCommandsEvent): Promise<void>;
1189
1190
  /**
1190
- * Called before global commands registration. This method can cancel the registration of the command and handle it manually.
1191
- * This method is called after `onBeforeRegisterCommands` if that stage was not handled.
1192
- * @param ctx The context
1193
- * @param event The command registration data
1194
- */
1191
+ * Called before global commands registration. This method can cancel the registration of the command and handle it manually.
1192
+ * This method is called after `onBeforeRegisterCommands` if that stage was not handled.
1193
+ * @param ctx The context
1194
+ * @param event The command registration data
1195
+ */
1195
1196
  onBeforeRegisterGlobalCommands(ctx: CommandKitPluginRuntime, event: PreRegisterCommandsEvent): Promise<void>;
1196
1197
  /**
1197
- * Called before guild commands registration. This method can cancel the registration of the command and handle it manually.
1198
- * This method is called before guilds of the command are resolved. It is called after `onBeforeRegisterCommands` if that stage was not handled.
1199
- * @param ctx The context
1200
- * @param event The command registration data
1201
- */
1198
+ * Called before guild commands registration. This method can cancel the registration of the command and handle it manually.
1199
+ * This method is called before guilds of the command are resolved. It is called after `onBeforeRegisterCommands` if that stage was not handled.
1200
+ * @param ctx The context
1201
+ * @param event The command registration data
1202
+ */
1202
1203
  onBeforePrepareGuildCommandsRegistration(ctx: CommandKitPluginRuntime, event: PreRegisterCommandsEvent): Promise<void>;
1203
1204
  /**
1204
- * Called before guild commands registration. This method can cancel the registration of the command and handle it manually.
1205
- * This method is called after guilds of the command are resolved. It is called after `onBeforePrepareGuildCommandsRegistration` if that stage was not handled.
1206
- * @param ctx The context
1207
- * @param event The command registration data
1208
- */
1205
+ * Called before guild commands registration. This method can cancel the registration of the command and handle it manually.
1206
+ * This method is called after guilds of the command are resolved. It is called after `onBeforePrepareGuildCommandsRegistration` if that stage was not handled.
1207
+ * @param ctx The context
1208
+ * @param event The command registration data
1209
+ */
1209
1210
  onBeforeRegisterGuildCommands(ctx: CommandKitPluginRuntime, event: PreRegisterCommandsEvent): Promise<void>;
1210
1211
  /**
1211
- * Called after command and all of its deferred functions are executed.
1212
- * @param ctx The context
1213
- * @param env The environment of the command. This environment contains the command execution data such as command context and more.
1214
- */
1212
+ * Called after command and all of its deferred functions are executed.
1213
+ * @param ctx The context
1214
+ * @param env The environment of the command. This environment contains the command execution data such as command context and more.
1215
+ */
1215
1216
  onAfterCommand(ctx: CommandKitPluginRuntime, env: CommandKitEnvironment): Promise<void>;
1216
1217
  /**
1217
- * Called before emitting an event
1218
- * @param ctx The context
1219
- * @param event The event that is being emitted
1220
- */
1218
+ * Called before emitting an event
1219
+ * @param ctx The context
1220
+ * @param event The event that is being emitted
1221
+ */
1221
1222
  willEmitEvent(ctx: CommandKitPluginRuntime, event: CommandKitEventDispatch): Promise<void>;
1222
1223
  }
1223
1224
  declare function isRuntimePlugin(plugin: unknown): plugin is RuntimePlugin;
@@ -1236,28 +1237,28 @@ type MaybeFalsey<T> = T | false | null | undefined;
1236
1237
  */
1237
1238
  interface CommandKitEventDispatch {
1238
1239
  /**
1239
- * The name of the event.
1240
- */
1240
+ * The name of the event.
1241
+ */
1241
1242
  name: string;
1242
1243
  /**
1243
- * The arguments passed to the event.
1244
- */
1244
+ * The arguments passed to the event.
1245
+ */
1245
1246
  args: unknown[];
1246
1247
  /**
1247
- * The namespace of the event, if any.
1248
- */
1248
+ * The namespace of the event, if any.
1249
+ */
1249
1250
  namespace: string | null;
1250
1251
  /**
1251
- * If this event runs only once, it will be set to true.
1252
- */
1252
+ * If this event runs only once, it will be set to true.
1253
+ */
1253
1254
  once: boolean;
1254
1255
  /**
1255
- * The additional metadata associated with the event.
1256
- */
1256
+ * The additional metadata associated with the event.
1257
+ */
1257
1258
  metadata: ParsedEvent;
1258
1259
  /**
1259
- * Captures the owner of the event, preventing other plugins from handling it.
1260
- */
1260
+ * Captures the owner of the event, preventing other plugins from handling it.
1261
+ */
1261
1262
  accept(): void;
1262
1263
  }
1263
1264
  /**
@@ -1272,22 +1273,22 @@ type TemplateHandler = (args: string[]) => Promise<void> | void;
1272
1273
  */
1273
1274
  interface PluginTransformParameters {
1274
1275
  /**
1275
- * The code to be transformed.
1276
- */
1276
+ * The code to be transformed.
1277
+ */
1277
1278
  code: string;
1278
1279
  /**
1279
- * The filename of the code being transformed.
1280
- */
1280
+ * The filename of the code being transformed.
1281
+ */
1281
1282
  id: string;
1282
1283
  }
1283
1284
  interface TransformedResult {
1284
1285
  /**
1285
- * The transformed code.
1286
- */
1286
+ * The transformed code.
1287
+ */
1287
1288
  code?: string;
1288
1289
  /**
1289
- * The source map for the transformed code, if applicable.
1290
- */
1290
+ * The source map for the transformed code, if applicable.
1291
+ */
1291
1292
  map?: string | null;
1292
1293
  }
1293
1294
  /**
@@ -1295,14 +1296,14 @@ interface TransformedResult {
1295
1296
  */
1296
1297
  declare abstract class CompilerPlugin<T extends PluginOptions = PluginOptions> extends PluginCommon<T, CompilerPluginRuntime> {
1297
1298
  /**
1298
- * The type of the plugin, which is Compiler.
1299
- */
1299
+ * The type of the plugin, which is Compiler.
1300
+ */
1300
1301
  readonly type = PluginType.Compiler;
1301
1302
  /**
1302
- * Called when transformation is requested to this plugin
1303
- * @param params The parameters for the transformation
1304
- * @returns The transformed result
1305
- */
1303
+ * Called when transformation is requested to this plugin
1304
+ * @param params The parameters for the transformation
1305
+ * @returns The transformed result
1306
+ */
1306
1307
  transform(params: PluginTransformParameters): Promise<MaybeFalsey<TransformedResult>>;
1307
1308
  }
1308
1309
  /**
@@ -1318,9 +1319,9 @@ declare function isCompilerPlugin(plugin: unknown): plugin is CompilerPlugin;
1318
1319
  */
1319
1320
  type CommonDirectiveTransformerOptions = DirectiveTransformerOptions & {
1320
1321
  /**
1321
- * Whether the directive transformer is enabled.
1322
- * Defaults to true.
1323
- */
1322
+ * Whether the directive transformer is enabled.
1323
+ * Defaults to true.
1324
+ */
1324
1325
  enabled?: boolean;
1325
1326
  };
1326
1327
  /**
@@ -1340,72 +1341,74 @@ declare abstract class CommonDirectiveTransformer extends CompilerPlugin<CommonD
1340
1341
  declare class CompilerPluginRuntime {
1341
1342
  #private;
1342
1343
  private readonly plugins;
1344
+ readonly isDevMode: boolean;
1343
1345
  readonly name = "CompilerPluginRuntime";
1344
1346
  private initialized;
1345
1347
  private templates;
1346
1348
  /**
1347
- * Creates a new instance of CompilerPluginRuntime.
1348
- * @param plugins An array of compiler plugins to be managed by this runtime.
1349
- */
1350
- constructor(plugins: CompilerPlugin[]);
1349
+ * Creates a new instance of CompilerPluginRuntime.
1350
+ * @param plugins An array of compiler plugins to be managed by this runtime.
1351
+ * @param isDevMode Whether the build is in development mode.
1352
+ */
1353
+ constructor(plugins: CompilerPlugin[], isDevMode: boolean);
1351
1354
  /**
1352
- * Returns the plugins managed by this runtime.
1353
- */
1355
+ * Returns the plugins managed by this runtime.
1356
+ */
1354
1357
  getPlugins(): CompilerPlugin<PluginOptions>[];
1355
1358
  /**
1356
- * Checks if there are no plugins registered in this runtime.
1357
- */
1359
+ * Checks if there are no plugins registered in this runtime.
1360
+ */
1358
1361
  isEmpty(): boolean;
1359
1362
  /**
1360
- * Registers a template handler for a given name.
1361
- * This method must be called inside the activate() method of a plugin.
1362
- * @param name - The name of the template to register.
1363
- * @param handler - The handler function for the template.
1364
- */
1363
+ * Registers a template handler for a given name.
1364
+ * This method must be called inside the activate() method of a plugin.
1365
+ * @param name - The name of the template to register.
1366
+ * @param handler - The handler function for the template.
1367
+ */
1365
1368
  registerTemplate(name: string, handler: TemplateHandler): void;
1366
1369
  /**
1367
- * Unregister a template handler for a given name.
1368
- * This method must be called inside the deactivate() method of a plugin.
1369
- * @param name - The name of the template to unregister.
1370
- */
1370
+ * Unregister a template handler for a given name.
1371
+ * This method must be called inside the deactivate() method of a plugin.
1372
+ * @param name - The name of the template to unregister.
1373
+ */
1371
1374
  unregisterTemplate(name: string): void;
1372
1375
  /**
1373
- * Retrieves a template handler by its name.
1374
- * @param name - The name of the template to retrieve.
1375
- * @returns The template handler if found, otherwise undefined.
1376
- */
1376
+ * Retrieves a template handler by its name.
1377
+ * @param name - The name of the template to retrieve.
1378
+ * @returns The template handler if found, otherwise undefined.
1379
+ */
1377
1380
  getTemplate(name: string): TemplateHandler | undefined;
1378
1381
  /**
1379
- * Returns a map of all registered templates with their handlers.
1380
- * The keys are the template names and the values are the template handlers.
1381
- */
1382
+ * Returns a map of all registered templates with their handlers.
1383
+ * The keys are the template names and the values are the template handlers.
1384
+ */
1382
1385
  getTemplates(): Map<string, TemplateHandler>;
1383
1386
  /**
1384
- * Transforms the given code using all registered plugins.
1385
- * Each plugin's transform method is called in sequence, allowing them to modify the code.
1386
- * @param code - The code to be transformed.
1387
- * @param id - The identifier for the code being transformed (e.g., filename).
1388
- * @returns An object containing the transformed code and an optional source map.
1389
- */
1387
+ * Transforms the given code using all registered plugins.
1388
+ * Each plugin's transform method is called in sequence, allowing them to modify the code.
1389
+ * @param code - The code to be transformed.
1390
+ * @param id - The identifier for the code being transformed (e.g., filename).
1391
+ * @returns An object containing the transformed code and an optional source map.
1392
+ */
1390
1393
  transform(code: string, id: string): Promise<{
1391
1394
  code: string;
1392
1395
  map: string | null;
1393
1396
  }>;
1394
1397
  /**
1395
- * Initializes the plugin runtime by activating all registered plugins.
1396
- * This method should be called once to set up the plugins.
1397
- */
1398
+ * Initializes the plugin runtime by activating all registered plugins.
1399
+ * This method should be called once to set up the plugins.
1400
+ */
1398
1401
  init(): Promise<void>;
1399
1402
  /**
1400
- * Destroys the plugin runtime by deactivating all registered plugins.
1401
- * This method should be called when the runtime is no longer needed.
1402
- */
1403
+ * Destroys the plugin runtime by deactivating all registered plugins.
1404
+ * This method should be called when the runtime is no longer needed.
1405
+ */
1403
1406
  destroy(): Promise<void>;
1404
1407
  /**
1405
- * Converts the plugin runtime to a JSON representation.
1406
- * This is useful for serialization or debugging purposes.
1407
- * @returns An object containing the name of the runtime and the transform method.
1408
- */
1408
+ * Converts the plugin runtime to a JSON representation.
1409
+ * This is useful for serialization or debugging purposes.
1410
+ * @returns An object containing the name of the runtime and the transform method.
1411
+ */
1409
1412
  toJSON(): {
1410
1413
  name: string;
1411
1414
  transform: (code: string, id: string) => Promise<{
@@ -1441,32 +1444,32 @@ declare enum PluginType {
1441
1444
  declare abstract class PluginCommon<T extends PluginOptions = PluginOptions, C extends CommonPluginRuntime = CommonPluginRuntime> {
1442
1445
  protected readonly options: T;
1443
1446
  /**
1444
- * The type of the plugin, either Compiler or Runtime.
1445
- */
1447
+ * The type of the plugin, either Compiler or Runtime.
1448
+ */
1446
1449
  abstract readonly type: PluginType;
1447
1450
  /**
1448
- * Unique identifier for the plugin instance.
1449
- */
1451
+ * Unique identifier for the plugin instance.
1452
+ */
1450
1453
  readonly id: `${string}-${string}-${string}-${string}-${string}`;
1451
1454
  /**
1452
- * The time when the plugin was loaded, in milliseconds since the Unix epoch.
1453
- */
1455
+ * The time when the plugin was loaded, in milliseconds since the Unix epoch.
1456
+ */
1454
1457
  readonly loadedAt: number;
1455
1458
  /**
1456
- * The name of the plugin.
1457
- */
1459
+ * The name of the plugin.
1460
+ */
1458
1461
  abstract readonly name: string;
1459
1462
  /**
1460
- * Creates a new instance of the plugin.
1461
- */
1463
+ * Creates a new instance of the plugin.
1464
+ */
1462
1465
  constructor(options: T);
1463
1466
  /**
1464
- * Called when this plugin is activated
1465
- */
1467
+ * Called when this plugin is activated
1468
+ */
1466
1469
  activate(ctx: C): Promise<void>;
1467
1470
  /**
1468
- * Called when this plugin is deactivated
1469
- */
1471
+ * Called when this plugin is deactivated
1472
+ */
1470
1473
  deactivate(ctx: C): Promise<void>;
1471
1474
  }
1472
1475
  /**
@@ -1484,61 +1487,61 @@ declare class CommandKitPluginRuntime {
1484
1487
  readonly commandkit: CommandKit;
1485
1488
  private plugins;
1486
1489
  /**
1487
- * Creates a new instance of CommandKitPluginRuntime.
1488
- * @param commandkit The CommandKit instance associated with this runtime.
1489
- */
1490
+ * Creates a new instance of CommandKitPluginRuntime.
1491
+ * @param commandkit The CommandKit instance associated with this runtime.
1492
+ */
1490
1493
  constructor(commandkit: CommandKit);
1491
1494
  /**
1492
- * Returns the plugins registered in this runtime.
1493
- * @returns A collection of plugins.
1494
- */
1495
+ * Returns the plugins registered in this runtime.
1496
+ * @returns A collection of plugins.
1497
+ */
1495
1498
  getPlugins(): Collection<string, RuntimePlugin<PluginOptions>>;
1496
1499
  /**
1497
- * Checks if there are no plugins registered in this runtime.
1498
- * @param pluginName The name of the plugin to check.
1499
- * @returns Boolean indicating whether the runtime is empty.
1500
- */
1500
+ * Checks if there are no plugins registered in this runtime.
1501
+ * @param pluginName The name of the plugin to check.
1502
+ * @returns Boolean indicating whether the runtime is empty.
1503
+ */
1501
1504
  getPlugin(pluginName: string): RuntimePlugin | null;
1502
1505
  /**
1503
- * Fetches the given plugin
1504
- * @param plugin The plugin to be fetched.
1505
- */
1506
+ * Fetches the given plugin
1507
+ * @param plugin The plugin to be fetched.
1508
+ */
1506
1509
  get<T extends Constructable<any>>(plugin: T): InstanceType<T> | null;
1507
1510
  /**
1508
- * Pre-loads the specified entrypoints for the given plugin.
1509
- * @param plugin The plugin to pre-load.
1510
- */
1511
+ * Pre-loads the specified entrypoints for the given plugin.
1512
+ * @param plugin The plugin to pre-load.
1513
+ */
1511
1514
  preload(plugin: RuntimePlugin): Promise<void>;
1512
1515
  /**
1513
- * Soft registers a plugin in the runtime.
1514
- * @param plugin The plugin to be registered.
1515
- */
1516
+ * Soft registers a plugin in the runtime.
1517
+ * @param plugin The plugin to be registered.
1518
+ */
1516
1519
  softRegisterPlugin(plugin: RuntimePlugin): Promise<void>;
1517
1520
  /**
1518
- * Registers a plugin in the runtime.
1519
- * @param plugin The plugin to be registered.
1520
- * @throws If a plugin with the same name already exists.
1521
- */
1521
+ * Registers a plugin in the runtime.
1522
+ * @param plugin The plugin to be registered.
1523
+ * @throws If a plugin with the same name already exists.
1524
+ */
1522
1525
  registerPlugin(plugin: RuntimePlugin): Promise<void>;
1523
1526
  /**
1524
- * Unregisters a plugin from the runtime.
1525
- * @param plugin The plugin to be unregistered.
1526
- * @throws If the plugin does not exist.
1527
- */
1527
+ * Unregisters a plugin from the runtime.
1528
+ * @param plugin The plugin to be unregistered.
1529
+ * @throws If the plugin does not exist.
1530
+ */
1528
1531
  unregisterPlugin(plugin: RuntimePlugin): Promise<void>;
1529
1532
  /**
1530
- * Unregisters all plugins from the runtime.
1531
- */
1533
+ * Unregisters all plugins from the runtime.
1534
+ */
1532
1535
  unregisterAllPlugins(): Promise<void>;
1533
1536
  /**
1534
- * Signals the runtime to allow the current plugin take ownership of the execution context.
1535
- */
1537
+ * Signals the runtime to allow the current plugin take ownership of the execution context.
1538
+ */
1536
1539
  capture(): void;
1537
1540
  /**
1538
- * Executes a function for each plugin in the runtime.
1539
- * @param f The function to execute for each plugin.
1540
- * @returns The result of the last executed function, or undefined if no plugins were executed.
1541
- */
1541
+ * Executes a function for each plugin in the runtime.
1542
+ * @param f The function to execute for each plugin.
1543
+ * @returns The result of the last executed function, or undefined if no plugins were executed.
1544
+ */
1542
1545
  execute<R = any>(f: AsyncFunction<[CommandKitPluginRuntime, RuntimePlugin], R | undefined>): Promise<true | R | undefined>;
1543
1546
  }
1544
1547
  //#endregion
@@ -1550,24 +1553,24 @@ declare class CommandKitPluginRuntime {
1550
1553
  */
1551
1554
  interface FlagProvider {
1552
1555
  /**
1553
- * Initialize the provider (e.g., establish connections, load initial config)
1554
- */
1556
+ * Initialize the provider (e.g., establish connections, load initial config)
1557
+ */
1555
1558
  initialize?(): MaybePromise<void>;
1556
1559
  /**
1557
- * Get the current value/configuration for a feature flag
1558
- * @param key - The feature flag key
1559
- * @param context - Optional context for flag evaluation
1560
- * @returns The flag configuration or null if not found
1561
- */
1560
+ * Get the current value/configuration for a feature flag
1561
+ * @param key - The feature flag key
1562
+ * @param context - Optional context for flag evaluation
1563
+ * @returns The flag configuration or null if not found
1564
+ */
1562
1565
  getFlag(key: string, context?: any): MaybePromise<FlagConfiguration | null>;
1563
1566
  /**
1564
- * Check if a flag exists in the external system
1565
- * @param key - The feature flag key
1566
- */
1567
+ * Check if a flag exists in the external system
1568
+ * @param key - The feature flag key
1569
+ */
1567
1570
  hasFlag(key: string): MaybePromise<boolean>;
1568
1571
  /**
1569
- * Cleanup resources when the provider is no longer needed
1570
- */
1572
+ * Cleanup resources when the provider is no longer needed
1573
+ */
1571
1574
  destroy?(): MaybePromise<void>;
1572
1575
  }
1573
1576
  /**
@@ -1575,20 +1578,20 @@ interface FlagProvider {
1575
1578
  */
1576
1579
  interface FlagConfiguration {
1577
1580
  /**
1578
- * Whether the flag is enabled/disabled at the provider level
1579
- */
1581
+ * Whether the flag is enabled/disabled at the provider level
1582
+ */
1580
1583
  enabled: boolean;
1581
1584
  /**
1582
- * Optional configuration data that can be used in the decide function
1583
- */
1585
+ * Optional configuration data that can be used in the decide function
1586
+ */
1584
1587
  config?: Record<string, any>;
1585
1588
  /**
1586
- * Optional percentage for gradual rollouts (0-100)
1587
- */
1589
+ * Optional percentage for gradual rollouts (0-100)
1590
+ */
1588
1591
  percentage?: number;
1589
1592
  /**
1590
- * Optional targeting rules or segments
1591
- */
1593
+ * Optional targeting rules or segments
1594
+ */
1592
1595
  targeting?: {
1593
1596
  segments?: string[];
1594
1597
  rules?: Array<{
@@ -1644,30 +1647,30 @@ type DecideFunction<E, R> = (data: {
1644
1647
  */
1645
1648
  interface FeatureFlagDefinition<R, Entity> {
1646
1649
  /**
1647
- * Unique key for the feature flag.
1648
- * Should be a string that identifies the flag.
1649
- */
1650
+ * Unique key for the feature flag.
1651
+ * Should be a string that identifies the flag.
1652
+ */
1650
1653
  key: string;
1651
1654
  /**
1652
- * Optional description of the feature flag.
1653
- * This can be used for documentation or debugging purposes.
1654
- */
1655
+ * Optional description of the feature flag.
1656
+ * This can be used for documentation or debugging purposes.
1657
+ */
1655
1658
  description?: string;
1656
1659
  /**
1657
- * Optional flag to enable integration with an external flag provider.
1658
- * If true, the flag will use the global flag provider to determine its state.
1659
- * Default: false
1660
- */
1660
+ * Optional flag to enable integration with an external flag provider.
1661
+ * If true, the flag will use the global flag provider to determine its state.
1662
+ * Default: false
1663
+ */
1661
1664
  identify?: IdentifyFunction<Entity>;
1662
1665
  /**
1663
- * Function to decide the outcome of the feature flag.
1664
- * This function receives the identified entities and should return the result of the decision.
1665
- */
1666
+ * Function to decide the outcome of the feature flag.
1667
+ * This function receives the identified entities and should return the result of the decision.
1668
+ */
1666
1669
  decide: DecideFunction<Entity, R>;
1667
1670
  /**
1668
- * Whether to disable analytics tracking for this flag.
1669
- * Default: false
1670
- */
1671
+ * Whether to disable analytics tracking for this flag.
1672
+ * Default: false
1673
+ */
1671
1674
  disableAnalytics?: boolean;
1672
1675
  }
1673
1676
  /**
@@ -1675,49 +1678,49 @@ interface FeatureFlagDefinition<R, Entity> {
1675
1678
  */
1676
1679
  interface CommandFlagContext {
1677
1680
  /**
1678
- * The Discord client instance.
1679
- * This is the main entry point for interacting with the Discord API.
1680
- */
1681
+ * The Discord client instance.
1682
+ * This is the main entry point for interacting with the Discord API.
1683
+ */
1681
1684
  client: Client<true>;
1682
1685
  /**
1683
- * The CommandKit instance, which provides access to the command framework.
1684
- * This includes commands, events, and other features of CommandKit.
1685
- */
1686
+ * The CommandKit instance, which provides access to the command framework.
1687
+ * This includes commands, events, and other features of CommandKit.
1688
+ */
1686
1689
  commandkit: CommandKit;
1687
1690
  /**
1688
- * The command context, which includes information about the command being executed.
1689
- * This can include the interaction, message, guild, channel, and the loaded command.
1690
- */
1691
+ * The command context, which includes information about the command being executed.
1692
+ * This can include the interaction, message, guild, channel, and the loaded command.
1693
+ */
1691
1694
  command: {
1692
1695
  /**
1693
- * The interaction object if the command was invoked via an interaction.
1694
- * This can be a ChatInputCommandInteraction, AutocompleteInteraction, or ContextMenuCommandInteraction.
1695
- */
1696
+ * The interaction object if the command was invoked via an interaction.
1697
+ * This can be a ChatInputCommandInteraction, AutocompleteInteraction, or ContextMenuCommandInteraction.
1698
+ */
1696
1699
  interaction?: ChatInputCommandInteraction | AutocompleteInteraction | ContextMenuCommandInteraction;
1697
1700
  /**
1698
- * The message object if the command was invoked via a message.
1699
- */
1701
+ * The message object if the command was invoked via a message.
1702
+ */
1700
1703
  message?: Message;
1701
1704
  /**
1702
- * The guild where the command was invoked, if applicable.
1703
- * This will be null for commands invoked in DMs.
1704
- */
1705
+ * The guild where the command was invoked, if applicable.
1706
+ * This will be null for commands invoked in DMs.
1707
+ */
1705
1708
  guild: Guild | null;
1706
1709
  /**
1707
- * The channel where the command was invoked.
1708
- * This can be a text channel, DM channel, or any other type of text-based channel.
1709
- */
1710
+ * The channel where the command was invoked.
1711
+ * This can be a text channel, DM channel, or any other type of text-based channel.
1712
+ */
1710
1713
  channel: TextBasedChannel | null;
1711
1714
  /**
1712
- * The loaded command instance that is being executed.
1713
- * This contains the command's metadata and logic.
1714
- */
1715
+ * The loaded command instance that is being executed.
1716
+ * This contains the command's metadata and logic.
1717
+ */
1715
1718
  command: LoadedCommand;
1716
1719
  };
1717
1720
  /**
1718
- * The event context is null for command flags, as they are not tied to a specific event.
1719
- * This is used to differentiate between command and event flags.
1720
- */
1721
+ * The event context is null for command flags, as they are not tied to a specific event.
1722
+ * This is used to differentiate between command and event flags.
1723
+ */
1721
1724
  event: null;
1722
1725
  }
1723
1726
  /**
@@ -1725,53 +1728,53 @@ interface CommandFlagContext {
1725
1728
  */
1726
1729
  interface EventFlagContext {
1727
1730
  /**
1728
- * The Discord client instance.
1729
- * This is the main entry point for interacting with the Discord API.
1730
- */
1731
+ * The Discord client instance.
1732
+ * This is the main entry point for interacting with the Discord API.
1733
+ */
1731
1734
  client: Client<true>;
1732
1735
  /**
1733
- * The CommandKit instance, which provides access to the command framework.
1734
- * This includes commands, events, and other features of CommandKit.
1735
- */
1736
+ * The CommandKit instance, which provides access to the command framework.
1737
+ * This includes commands, events, and other features of CommandKit.
1738
+ */
1736
1739
  commandkit: CommandKit;
1737
1740
  /**
1738
- * The event context, which includes information about the event being processed.
1739
- * This can include the parsed event data, the event name, and the namespace if applicable.
1740
- */
1741
+ * The event context, which includes information about the event being processed.
1742
+ * This can include the parsed event data, the event name, and the namespace if applicable.
1743
+ */
1741
1744
  event: {
1742
1745
  /**
1743
- * The parsed event data, which contains the raw data from the event.
1744
- * This can include information like user IDs, channel IDs, and other relevant data.
1745
- */
1746
+ * The parsed event data, which contains the raw data from the event.
1747
+ * This can include information like user IDs, channel IDs, and other relevant data.
1748
+ */
1746
1749
  data: ParsedEvent;
1747
1750
  /**
1748
- * The name of the event being processed.
1749
- * This is the string identifier for the event, such as 'messageCreate' or 'guildMemberAdd'.
1750
- */
1751
+ * The name of the event being processed.
1752
+ * This is the string identifier for the event, such as 'messageCreate' or 'guildMemberAdd'.
1753
+ */
1751
1754
  event: string;
1752
1755
  /**
1753
- * The namespace of the event, if applicable.
1754
- * This can be used to group related events or commands together.
1755
- * It is null if the event does not belong to a specific namespace.
1756
- */
1756
+ * The namespace of the event, if applicable.
1757
+ * This can be used to group related events or commands together.
1758
+ * It is null if the event does not belong to a specific namespace.
1759
+ */
1757
1760
  namespace: string | null;
1758
1761
  /**
1759
- * The arguments passed to the event handler.
1760
- * This is an array of arguments that were passed when the event was triggered.
1761
- * It can be used to access specific data related to the event.
1762
- */
1762
+ * The arguments passed to the event handler.
1763
+ * This is an array of arguments that were passed when the event was triggered.
1764
+ * It can be used to access specific data related to the event.
1765
+ */
1763
1766
  arguments: any[];
1764
1767
  /**
1765
- * A function to retrieve the arguments for a specific event type.
1766
- * This allows for type-safe access to the arguments based on the event name.
1767
- * @param event - The name of the event to retrieve arguments for.
1768
- */
1768
+ * A function to retrieve the arguments for a specific event type.
1769
+ * This allows for type-safe access to the arguments based on the event name.
1770
+ * @param event - The name of the event to retrieve arguments for.
1771
+ */
1769
1772
  argumentsAs<E extends keyof ClientEvents>(event: E): ClientEvents[E];
1770
1773
  };
1771
1774
  /**
1772
- * The command context is null for event flags, as they are not tied to a specific command.
1773
- * This is used to differentiate between command and event flags.
1774
- */
1775
+ * The command context is null for event flags, as they are not tied to a specific command.
1776
+ * This is used to differentiate between command and event flags.
1777
+ */
1775
1778
  command: null;
1776
1779
  }
1777
1780
  /**
@@ -1791,25 +1794,25 @@ type CustomEvaluationFunction<E> = () => MaybePromise<E>;
1791
1794
  */
1792
1795
  type CustomEvaluationContext<E> = {
1793
1796
  /**
1794
- * Optional function to identify the entities for evaluation.
1795
- * This can be a function that returns the entities based on the current context.
1796
- */
1797
+ * Optional function to identify the entities for evaluation.
1798
+ * This can be a function that returns the entities based on the current context.
1799
+ */
1797
1800
  identify: E | CustomEvaluationFunction<E>;
1798
1801
  };
1799
1802
  interface FlagRunner<E, R> {
1800
1803
  /**
1801
- * Execute the feature flag evaluation with the provided entities.
1802
- * This method will run the identify and decide functions to determine the flag's outcome.
1803
- * @param res - Optional entities to use for evaluation. If not provided, it will call the identify function.
1804
- * @returns A promise that resolves to the result of the feature flag evaluation.
1805
- */
1804
+ * Execute the feature flag evaluation with the provided entities.
1805
+ * This method will run the identify and decide functions to determine the flag's outcome.
1806
+ * @param res - Optional entities to use for evaluation. If not provided, it will call the identify function.
1807
+ * @returns A promise that resolves to the result of the feature flag evaluation.
1808
+ */
1806
1809
  (): Promise<R>;
1807
1810
  /**
1808
- * Run the feature flag evaluation with a custom context.
1809
- * This allows for more flexible evaluation based on custom logic or external data.
1810
- * @param context - The custom evaluation context containing the identify function or object.
1811
- * @returns A promise that resolves to the result of the feature flag evaluation.
1812
- */
1811
+ * Run the feature flag evaluation with a custom context.
1812
+ * This allows for more flexible evaluation based on custom logic or external data.
1813
+ * @param context - The custom evaluation context containing the identify function or object.
1814
+ * @returns A promise that resolves to the result of the feature flag evaluation.
1815
+ */
1813
1816
  run(context: CustomEvaluationContext<E>): Promise<R>;
1814
1817
  }
1815
1818
  /**
@@ -1819,16 +1822,16 @@ declare class FeatureFlag<R, T> {
1819
1822
  readonly options: FeatureFlagDefinition<R, T>;
1820
1823
  private commandkit;
1821
1824
  /**
1822
- * Create a new feature flag.
1823
- * @param options - The options for the feature flag.
1824
- */
1825
+ * Create a new feature flag.
1826
+ * @param options - The options for the feature flag.
1827
+ */
1825
1828
  constructor(options: FeatureFlagDefinition<R, T>);
1826
1829
  private getContext;
1827
1830
  /**
1828
- * Execute the feature flag evaluation.
1829
- * @param res - Optional entities to use for evaluation. If not provided, it will call the identify function.
1830
- * @returns A promise that resolves to the result of the feature flag evaluation.
1831
- */
1831
+ * Execute the feature flag evaluation.
1832
+ * @param res - Optional entities to use for evaluation. If not provided, it will call the identify function.
1833
+ * @returns A promise that resolves to the result of the feature flag evaluation.
1834
+ */
1832
1835
  execute(res?: T): Promise<R>;
1833
1836
  }
1834
1837
  /**
@@ -1848,114 +1851,114 @@ declare class FlagStore extends Collection<string, FeatureFlag<any, any>> {}
1848
1851
  //#region src/config/types.d.ts
1849
1852
  interface CommandKitCompilerOptions {
1850
1853
  /**
1851
- * The macro compiler options to use with CommandKit.
1852
- */
1854
+ * The macro compiler options to use with CommandKit.
1855
+ */
1853
1856
  macro?: {
1854
1857
  /**
1855
- * Whether to enable macro function compilation in development mode.
1856
- * @default false
1857
- */
1858
+ * Whether to enable macro function compilation in development mode.
1859
+ * @default false
1860
+ */
1858
1861
  development?: boolean;
1859
1862
  };
1860
1863
  /**
1861
- * The tsdown compiler options to use with CommandKit.
1862
- * **DO NOT USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING** as it alters the behavior of the build process.
1863
- */
1864
- tsdown?: Partial<Options>;
1864
+ * The tsdown compiler options to use with CommandKit.
1865
+ * **DO NOT USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING** as it alters the behavior of the build process.
1866
+ */
1867
+ tsdown?: Partial<InlineConfig>;
1865
1868
  /**
1866
- * Disables chunking of the output (production only, development never chunks).
1867
- * @default false
1868
- */
1869
+ * Disables chunking of the output (production only, development never chunks).
1870
+ * @default false
1871
+ */
1869
1872
  disableChunking?: boolean;
1870
1873
  }
1871
1874
  interface CommandKitConfig {
1872
1875
  /**
1873
- * The plugins to use with CommandKit.
1874
- * Can be a single plugin, an array of plugins, or a nested array of plugins.
1875
- */
1876
+ * The plugins to use with CommandKit.
1877
+ * Can be a single plugin, an array of plugins, or a nested array of plugins.
1878
+ */
1876
1879
  plugins?: MaybeArray<CommandKitPlugin>[] | Array<CommandKitPlugin>;
1877
1880
  /**
1878
- * The rolldown plugins to use with CommandKit.
1879
- */
1881
+ * The rolldown plugins to use with CommandKit.
1882
+ */
1880
1883
  rolldownPlugins?: any[];
1881
1884
  /**
1882
- * The list of additional entrypoints to compile. Eg, `dir` or `dir/index.ts` or `dir/*.ts`, etc.
1883
- * Similarly, negative patterns can be used to exclude files. Eg, `!dir/index.ts` or `!dir/*.ts`, etc.
1884
- */
1885
+ * The list of additional entrypoints to compile. Eg, `dir` or `dir/index.ts` or `dir/*.ts`, etc.
1886
+ * Similarly, negative patterns can be used to exclude files. Eg, `!dir/index.ts` or `!dir/*.ts`, etc.
1887
+ */
1885
1888
  entrypoints?: string[];
1886
1889
  /**
1887
- * The compiler options to use with CommandKit.
1888
- */
1890
+ * The compiler options to use with CommandKit.
1891
+ */
1889
1892
  compilerOptions?: CommandKitCompilerOptions;
1890
1893
  /**
1891
- * The typescript configuration to use with CommandKit.
1892
- */
1894
+ * The typescript configuration to use with CommandKit.
1895
+ */
1893
1896
  typescript?: {
1894
1897
  /**
1895
- * Whether to ignore type checking during builds.
1896
- */
1898
+ * Whether to ignore type checking during builds.
1899
+ */
1897
1900
  ignoreBuildErrors?: boolean;
1898
1901
  };
1899
1902
  /**
1900
- * Whether to generate static command handler data in production builds.
1901
- */
1903
+ * Whether to generate static command handler data in production builds.
1904
+ */
1902
1905
  static?: boolean;
1903
1906
  /**
1904
- * Statically define the environment variables to use.
1905
- */
1907
+ * Statically define the environment variables to use.
1908
+ */
1906
1909
  env?: Record<string, string>;
1907
1910
  /**
1908
- * The custom build directory name to use.
1909
- * @default `dist`
1910
- */
1911
+ * The custom build directory name to use.
1912
+ * @default `dist`
1913
+ */
1911
1914
  distDir?: string;
1912
1915
  /**
1913
- * The anti-crash script configuration.
1914
- */
1916
+ * The anti-crash script configuration.
1917
+ */
1915
1918
  antiCrashScript?: {
1916
1919
  /**
1917
- * Whether to enable the anti-crash script in development mode.
1918
- * @default true
1919
- */
1920
+ * Whether to enable the anti-crash script in development mode.
1921
+ * @default true
1922
+ */
1920
1923
  development?: boolean;
1921
1924
  /**
1922
- * Whether to enable the anti-crash script in production mode. Usually, you should use other means to handle errors.
1923
- * @default false
1924
- */
1925
+ * Whether to enable the anti-crash script in production mode. Usually, you should use other means to handle errors.
1926
+ * @default false
1927
+ */
1925
1928
  production?: boolean;
1926
1929
  };
1927
1930
  /**
1928
- * Whether or not to enable the source map generation.
1929
- */
1931
+ * Whether or not to enable the source map generation.
1932
+ */
1930
1933
  sourceMap?: {
1931
1934
  /**
1932
- * Whether to enable source map generation in development mode.
1933
- */
1935
+ * Whether to enable source map generation in development mode.
1936
+ */
1934
1937
  development?: boolean;
1935
1938
  /**
1936
- * Whether to enable source map generation in production mode.
1937
- */
1939
+ * Whether to enable source map generation in production mode.
1940
+ */
1938
1941
  production?: boolean;
1939
1942
  };
1940
1943
  /**
1941
- * Whether or not to enable the typed commands.
1942
- * @default true
1943
- */
1944
+ * Whether or not to enable the typed commands.
1945
+ * @default true
1946
+ */
1944
1947
  typedCommands?: boolean;
1945
1948
  /**
1946
- * Whether or not to disable the prefix commands.
1947
- * @default false
1948
- */
1949
+ * Whether or not to disable the prefix commands.
1950
+ * @default false
1951
+ */
1949
1952
  disablePrefixCommands?: boolean;
1950
1953
  /**
1951
- * Whether or not to disable the built-in permissions middleware. This only affects `botPermissions` and `userPermissions` in the command metadata.
1952
- * @default false
1953
- */
1954
+ * Whether or not to disable the built-in permissions middleware. This only affects `botPermissions` and `userPermissions` in the command metadata.
1955
+ * @default false
1956
+ */
1954
1957
  disablePermissionsMiddleware?: boolean;
1955
1958
  /**
1956
- * Whether or not to show a warning when a prefix command is not found. This only affects development mode.
1957
- * @default true
1958
- */
1959
+ * Whether or not to show a warning when a prefix command is not found. This only affects development mode.
1960
+ * @default true
1961
+ */
1959
1962
  showUnknownPrefixCommandsWarning?: boolean;
1960
1963
  }
1961
1964
  //#endregion
@@ -1987,16 +1990,16 @@ type ResolvedCommandKitConfig = DeepRequired<CommandKitConfig, 'compilerOptions'
1987
1990
  */
1988
1991
  interface CommandKitConfiguration {
1989
1992
  /**
1990
- * The default locale for the CommandKit instance. This will be used to infer the locale of the guild or user if it has not been set explicitly.
1991
- * @default Locale.EnglishUS
1992
- */
1993
+ * The default locale for the CommandKit instance. This will be used to infer the locale of the guild or user if it has not been set explicitly.
1994
+ * @default Locale.EnglishUS
1995
+ */
1993
1996
  defaultLocale: Locale;
1994
1997
  /**
1995
- * A function that returns the command prefix for a given message.
1996
- * This is used to determine how to parse commands from messages.
1997
- * @param message The message to get the command prefix for.
1998
- * @returns The command prefix or an array of prefixes.
1999
- */
1998
+ * A function that returns the command prefix for a given message.
1999
+ * This is used to determine how to parse commands from messages.
2000
+ * @param message The message to get the command prefix for.
2001
+ * @returns The command prefix or an array of prefixes.
2002
+ */
2000
2003
  getMessageCommandPrefix: (message: Message) => Awaitable<string | string[] | RegExp>;
2001
2004
  }
2002
2005
  /**
@@ -2037,133 +2040,133 @@ declare function onApplicationBootstrap<F extends BootstrapFunction>(fn: F): voi
2037
2040
  declare class CommandKit extends EventEmitter {
2038
2041
  #private;
2039
2042
  /**
2040
- * The event interceptor to quickly register temporary event listeners
2041
- */
2043
+ * The event interceptor to quickly register temporary event listeners
2044
+ */
2042
2045
  eventInterceptor: EventInterceptor;
2043
2046
  /**
2044
- * The static createElement function to create jsx elements
2045
- */
2047
+ * The static createElement function to create jsx elements
2048
+ */
2046
2049
  static readonly createElement: typeof createElement;
2047
2050
  /**
2048
- * The static Fragment component to create jsx fragments
2049
- */
2051
+ * The static Fragment component to create jsx fragments
2052
+ */
2050
2053
  static readonly Fragment: typeof Fragment;
2051
2054
  /**
2052
- * The configuration for the CommandKit instance.
2053
- */
2055
+ * The configuration for the CommandKit instance.
2056
+ */
2054
2057
  readonly appConfig: CommandKitConfiguration;
2055
2058
  /**
2056
- * The configuration for the CommandKit environment.
2057
- */
2059
+ * The configuration for the CommandKit environment.
2060
+ */
2058
2061
  config: ResolvedCommandKitConfig;
2059
2062
  /**
2060
- * A key-value store for storing arbitrary data.
2061
- */
2063
+ * A key-value store for storing arbitrary data.
2064
+ */
2062
2065
  readonly store: Map<string, any>;
2063
2066
  /**
2064
- * A flag store for storing flags that can be used to enable or disable features.
2065
- */
2067
+ * A flag store for storing flags that can be used to enable or disable features.
2068
+ */
2066
2069
  readonly flags: FlagStore;
2067
2070
  /**
2068
- * The command router for the CommandKit instance.
2069
- */
2071
+ * The command router for the CommandKit instance.
2072
+ */
2070
2073
  commandsRouter: CommandsRouter;
2071
2074
  /**
2072
- * The events router for the CommandKit instance.
2073
- */
2075
+ * The events router for the CommandKit instance.
2076
+ */
2074
2077
  eventsRouter: EventsRouter;
2075
2078
  /**
2076
- * The command handler for the CommandKit instance.
2077
- * This is responsible for handling commands and their execution.
2078
- */
2079
+ * The command handler for the CommandKit instance.
2080
+ * This is responsible for handling commands and their execution.
2081
+ */
2079
2082
  commandHandler: AppCommandHandler;
2080
2083
  /**
2081
- * The event handler for the CommandKit instance.
2082
- * This is responsible for handling events and their execution.
2083
- */
2084
+ * The event handler for the CommandKit instance.
2085
+ * This is responsible for handling events and their execution.
2086
+ */
2084
2087
  eventHandler: AppEventsHandler;
2085
2088
  /**
2086
- * The plugins runtime for the CommandKit instance.
2087
- */
2089
+ * The plugins runtime for the CommandKit instance.
2090
+ */
2088
2091
  plugins: CommandKitPluginRuntime;
2089
2092
  /**
2090
- * The events channel for the CommandKit instance. This can be used to emit custom events.
2091
- */
2093
+ * The events channel for the CommandKit instance. This can be used to emit custom events.
2094
+ */
2092
2095
  events: CommandKitEventsChannel;
2093
2096
  /**
2094
- * The analytics engine for the CommandKit instance.
2095
- * This is responsible for tracking events and user interactions.
2096
- */
2097
+ * The analytics engine for the CommandKit instance.
2098
+ * This is responsible for tracking events and user interactions.
2099
+ */
2097
2100
  analytics: AnalyticsEngine;
2098
2101
  /**
2099
- * The static instance of CommandKit.
2100
- */
2102
+ * The static instance of CommandKit.
2103
+ */
2101
2104
  static instance: CommandKit | undefined;
2102
2105
  /**
2103
- * Create a new command and event handler with CommandKit.
2104
- * @param options - The default CommandKit configuration.
2105
- */
2106
+ * Create a new command and event handler with CommandKit.
2107
+ * @param options - The default CommandKit configuration.
2108
+ */
2106
2109
  constructor(options?: CommandKitOptions);
2107
2110
  /**
2108
- * Starts the commandkit application.
2109
- * @param token The application token to connect to the discord gateway. If not provided, it will use the `TOKEN` or `DISCORD_TOKEN` environment variable. If set to `false`, it will not login.
2110
- */
2111
+ * Starts the commandkit application.
2112
+ * @param token The application token to connect to the discord gateway. If not provided, it will use the `TOKEN` or `DISCORD_TOKEN` environment variable. If set to `false`, it will not login.
2113
+ */
2111
2114
  start(token?: string | false): Promise<void>;
2112
2115
  /**
2113
- * Loads all the plugins.
2114
- */
2116
+ * Loads all the plugins.
2117
+ */
2115
2118
  loadPlugins(): Promise<void>;
2116
2119
  /**
2117
- * Whether or not the commandkit application has started.
2118
- */
2120
+ * Whether or not the commandkit application has started.
2121
+ */
2119
2122
  get started(): boolean;
2120
2123
  /**
2121
- * Sets the prefix resolver for the command handler.
2122
- * @param resolver The resolver function.
2123
- */
2124
+ * Sets the prefix resolver for the command handler.
2125
+ * @param resolver The resolver function.
2126
+ */
2124
2127
  setPrefixResolver(resolver: (message: Message) => Awaitable<string | string[] | RegExp>): this;
2125
2128
  /**
2126
- * Sets the default locale for the command handler.
2127
- * @param locale The default locale.
2128
- */
2129
+ * Sets the default locale for the command handler.
2130
+ * @param locale The default locale.
2131
+ */
2129
2132
  setDefaultLocale(locale: Locale): this;
2130
2133
  /**
2131
- * Get the client attached to this CommandKit instance.
2132
- */
2134
+ * Get the client attached to this CommandKit instance.
2135
+ */
2133
2136
  get client(): Client;
2134
2137
  /**
2135
- * Sets the client attached to this CommandKit instance.
2136
- * @param client The client to set.
2137
- */
2138
+ * Sets the client attached to this CommandKit instance.
2139
+ * @param client The client to set.
2140
+ */
2138
2141
  setClient(client: Client): this;
2139
2142
  /**
2140
- * Updates application commands with the latest from "commandsPath".
2141
- */
2143
+ * Updates application commands with the latest from "commandsPath".
2144
+ */
2142
2145
  reloadCommands(): Promise<void>;
2143
2146
  /**
2144
- * Updates application events with the latest from "eventsPath".
2145
- */
2147
+ * Updates application events with the latest from "eventsPath".
2148
+ */
2146
2149
  reloadEvents(): Promise<void>;
2147
2150
  /**
2148
- * Increment the client listeners count.
2149
- */
2151
+ * Increment the client listeners count.
2152
+ */
2150
2153
  incrementClientListenersCount(): void;
2151
2154
  /**
2152
- * Decrement the client listeners count.
2153
- */
2155
+ * Decrement the client listeners count.
2156
+ */
2154
2157
  decrementClientListenersCount(): void;
2155
2158
  /**
2156
- * Path to the app directory. Returns `null` if not found.
2157
- * The lookup order is:
2158
- * - `./app`
2159
- * - `./src/app`
2160
- */
2159
+ * Path to the app directory. Returns `null` if not found.
2160
+ * The lookup order is:
2161
+ * - `./app`
2162
+ * - `./src/app`
2163
+ */
2161
2164
  getAppDirectory(): string | null;
2162
2165
  /**
2163
- * Get the path to the commands or events directory.
2164
- * @param to The type of path to get, either 'commands' or 'events'.
2165
- * @returns The path to the commands or events directory
2166
- */
2166
+ * Get the path to the commands or events directory.
2167
+ * @param to The type of path to get, either 'commands' or 'events'.
2168
+ * @returns The path to the commands or events directory
2169
+ */
2167
2170
  getPath(to: 'commands' | 'events'): string | null;
2168
2171
  }
2169
2172
  /**
@@ -2190,19 +2193,19 @@ type IdentifyEvent = Record<string, any>;
2190
2193
  */
2191
2194
  interface AnalyticsProvider {
2192
2195
  /**
2193
- * The name of the analytics provider.
2194
- * This is used for logging and identification purposes.
2195
- */
2196
+ * The name of the analytics provider.
2197
+ * This is used for logging and identification purposes.
2198
+ */
2196
2199
  readonly name: string;
2197
2200
  /**
2198
- * Initializes the analytics provider.
2199
- * This method is called when the provider is registered.
2200
- */
2201
+ * Initializes the analytics provider.
2202
+ * This method is called when the provider is registered.
2203
+ */
2201
2204
  track(engine: AnalyticsEngine, event: AnalyticsEvent): Promise<void>;
2202
2205
  /**
2203
- * Identifies a user or entity with the analytics provider.
2204
- * This method is called to associate user data with events.
2205
- */
2206
+ * Identifies a user or entity with the analytics provider.
2207
+ * This method is called to associate user data with events.
2208
+ */
2206
2209
  identify?(engine: AnalyticsEngine, event: IdentifyEvent): Promise<void>;
2207
2210
  }
2208
2211
  //#endregion
@@ -2222,49 +2225,49 @@ declare class AnalyticsEngine {
2222
2225
  #private;
2223
2226
  readonly commandkit: CommandKit;
2224
2227
  /**
2225
- * Creates an instance of the AnalyticsEngine.
2226
- * @param commandkit The CommandKit instance.
2227
- */
2228
+ * Creates an instance of the AnalyticsEngine.
2229
+ * @param commandkit The CommandKit instance.
2230
+ */
2228
2231
  constructor(commandkit: CommandKit);
2229
2232
  /**
2230
- * Sets a filter function for analytics events.
2231
- * This function will be called before tracking an event to determine if it should be tracked.
2232
- * If the filter returns `false`, the event will not be tracked.
2233
- * If the filter is set to `null`, all events will be tracked unless `doNotTrack` is enabled.
2234
- * @param filter The filter function to set, or `null` to remove the filter.
2235
- */
2233
+ * Sets a filter function for analytics events.
2234
+ * This function will be called before tracking an event to determine if it should be tracked.
2235
+ * If the filter returns `false`, the event will not be tracked.
2236
+ * If the filter is set to `null`, all events will be tracked unless `doNotTrack` is enabled.
2237
+ * @param filter The filter function to set, or `null` to remove the filter.
2238
+ */
2236
2239
  setFilter(filter: FilterFunction | null): void;
2237
2240
  /**
2238
- * Registers an analytics provider.
2239
- * This provider will be used to track and identify events.
2240
- * If a provider is already registered, it will be replaced with the new one.
2241
- * @param provider The analytics provider to register.
2242
- */
2241
+ * Registers an analytics provider.
2242
+ * This provider will be used to track and identify events.
2243
+ * If a provider is already registered, it will be replaced with the new one.
2244
+ * @param provider The analytics provider to register.
2245
+ */
2243
2246
  registerProvider(provider: AnalyticsProvider): void;
2244
2247
  /**
2245
- * Removes the currently registered analytics provider.
2246
- * @param provider The analytics provider to remove.
2247
- */
2248
+ * Removes the currently registered analytics provider.
2249
+ * @param provider The analytics provider to remove.
2250
+ */
2248
2251
  removeProvider(provider: AnalyticsProvider): void;
2249
2252
  /**
2250
- * Retrieves the currently registered analytics provider.
2251
- * @returns The currently registered analytics provider, or `null` if no provider is registered.
2252
- */
2253
+ * Retrieves the currently registered analytics provider.
2254
+ * @returns The currently registered analytics provider, or `null` if no provider is registered.
2255
+ */
2253
2256
  getProvider(): AnalyticsProvider | null;
2254
2257
  /**
2255
- * Identifies a user with the analytics provider.
2256
- * This method sends an identify event to the provider, which can be used to associate user data with events.
2257
- * @param event The identify event containing user data to send to the provider.
2258
- */
2258
+ * Identifies a user with the analytics provider.
2259
+ * This method sends an identify event to the provider, which can be used to associate user data with events.
2260
+ * @param event The identify event containing user data to send to the provider.
2261
+ */
2259
2262
  identify(event: IdentifyEvent): Promise<void>;
2260
2263
  /**
2261
- * Tracks an analytics event with the registered provider.
2262
- * This method sends the event to the provider, which can then process it as needed.
2263
- * If the `doNotTrack` setting is enabled or if the filter function returns `false`, the event will not be tracked.
2264
- * @param event The analytics event to track.
2265
- */
2264
+ * Tracks an analytics event with the registered provider.
2265
+ * This method sends the event to the provider, which can then process it as needed.
2266
+ * If the `doNotTrack` setting is enabled or if the filter function returns `false`, the event will not be tracked.
2267
+ * @param event The analytics event to track.
2268
+ */
2266
2269
  track(event: AnalyticsEvent): Promise<void>;
2267
2270
  }
2268
2271
  //#endregion
2269
- export { AnalyticsEngine, AnalyticsEvent, AnalyticsProvider, AnyCommandExecute, AppCommand, AppCommandHandler, AppCommandNative, AppCommandRunner, AppEventsHandler, AppEventsHandlerLoadedData, AsyncFunction, AutocompleteCommand, AutocompleteCommandContext, AutocompleteCommandMiddlewareContext, BootstrapFunction, ChatInputCommand, ChatInputCommandContext, CommandBuilderLike, CommandContext, CommandContextOptions, CommandData, CommandDataSchema, CommandDataSchemaKey, CommandDataSchemaValue, CommandExecutionMode, CommandFlagContext, CommandKit, CommandKitCompilerOptions, CommandKitConfig, CommandKitConfiguration, CommandKitEnvironment, CommandKitEnvironmentInternalData, CommandKitEnvironmentType, CommandKitEventDispatch, CommandKitEventsChannel, CommandKitHMREvent, CommandKitOptions, CommandKitPlugin, CommandKitPluginRuntime, CommandMetadata, CommandMetadataFunction, CommandRegistrar, CommandTypeData, CommonDirectiveTransformer, CommonDirectiveTransformerOptions, CommonPluginRuntime, CompilerPlugin, CompilerPluginRuntime, Context, ContextParameters, CustomAppCommandProps, CustomEvaluationContext, CustomEvaluationFunction, DecideFunction, DeepPartial, DeepRequired, EvaluationContext, EventFlagContext, EventHandler, EventListener, FeatureFlag, FeatureFlagDefinition, FilterFunction, FlagConfiguration, FlagProvider, FlagRunner, FlagStore, GenericFunction, IdentifyEvent, IdentifyFunction, InteractionCommandContext, InteractionCommandMiddlewareContext, IpcMessageCommand, JsonFlagProvider, ListenerFunction, LoadedCommand, LoadedEvent, MaybeFalsey, MaybePromise, MessageCommand, MessageCommandContext, MessageCommandMiddlewareContext, MessageContextMenuCommand, MessageContextMenuCommandContext, MessageContextMenuCommandMiddlewareContext, MiddlewareContext, MiddlewareContextArgs, PluginCommon, PluginOptions, PluginTransformParameters, PluginType, PreRegisterCommandsEvent, PreparedAppCommandExecution, ResolvableCommand, ResolvedCommandKitConfig, RunCommand, RunCommandOptions, RuntimePlugin, SlashCommandMiddlewareContext, TemplateHandler, TransformedResult, UserContextMenuCommand, UserContextMenuCommandContext, UserContextMenuCommandMiddlewareContext, after, cancelAfter, commandkit, exitContext, flag, getCommandKit, getContext, isCommandWorkerContext, isCompilerPlugin, isPlugin, isRuntimePlugin, makeContextAwareFunction, mergeDeep, onApplicationBootstrap, onBootstrap, provideContext, registerDevHooks, setFlagProvider, useEnvironment, useStore };
2270
- //# sourceMappingURL=analytics-engine-NOInIjv8.d.ts.map
2272
+ export { isRuntimePlugin as $, MessageCommand as $t, flag as A, makeContextAwareFunction as At, CommonPluginRuntime as B, PreRegisterCommandsEvent as Bt, EvaluationContext as C, RunCommandOptions as Ct, FlagRunner as D, getCommandKit as Dt, FeatureFlagDefinition as E, exitContext as Et, CommandKitPluginRuntime as F, CommandKitEnvironmentInternalData as Ft, PluginTransformParameters as G, ChatInputCommand as Gt, CommonDirectiveTransformer as H, AutocompleteCommand as Ht, PluginCommon as I, CommandKitEnvironmentType as It, CommandKitEventDispatch as J, CommandExecutionMode as Jt, TransformedResult as K, ChatInputCommandContext as Kt, PluginOptions as L, after as Lt, FlagConfiguration as M, useEnvironment as Mt, FlagProvider as N, useStore as Nt, IdentifyFunction as O, getContext as Ot, JsonFlagProvider as P, CommandKitEnvironment as Pt, RuntimePlugin as Q, InteractionCommandMiddlewareContext as Qt, PluginType as R, cancelAfter as Rt, DecideFunction as S, AppCommandRunner as St, FeatureFlag as T, GenericFunction as Tt, CommonDirectiveTransformerOptions as U, AutocompleteCommandContext as Ut, CompilerPluginRuntime as V, AnyCommandExecute as Vt, CompilerPlugin as W, AutocompleteCommandMiddlewareContext as Wt, MaybeFalsey as X, ContextParameters as Xt, CommandKitPlugin as Y, Context as Yt, TemplateHandler as Z, InteractionCommandContext as Zt, CommandKitConfig as _, CustomAppCommandProps as _t, IdentifyEvent as a, MiddlewareContext as an, EventListener as at, CustomEvaluationContext as b, ResolvableCommand as bt, CommandKitConfiguration as c, UserContextMenuCommand as cn, ListenerFunction as ct, onBootstrap as d, CommandContext as dn, AppCommandNative as dt, MessageCommandContext as en, CommandKitHMREvent as et, DeepPartial as f, CommandData as fn, CommandBuilderLike as ft, CommandKitCompilerOptions as g, EventHandler as gn, CommandTypeData as gt, mergeDeep as h, CommandMetadataFunction as hn, CommandDataSchemaValue as ht, AnalyticsProvider as i, MessageContextMenuCommandMiddlewareContext as in, AppEventsHandlerLoadedData as it, setFlagProvider as j, provideContext as jt, MaybePromise as k, isCommandWorkerContext as kt, commandkit as l, UserContextMenuCommandContext as ln, AppCommand as lt, ResolvedCommandKitConfig as m, CommandMetadata as mn, CommandDataSchemaKey as mt, FilterFunction as n, MessageContextMenuCommand as nn, registerDevHooks as nt, BootstrapFunction as o, MiddlewareContextArgs as on, LoadedEvent as ot, DeepRequired as p, CommandKitOptions as pn, CommandDataSchema as pt, isCompilerPlugin as q, CommandContextOptions as qt, AnalyticsEvent as r, MessageContextMenuCommandContext as rn, AppEventsHandler as rt, CommandKit as s, SlashCommandMiddlewareContext as sn, CommandKitEventsChannel as st, AnalyticsEngine as t, MessageCommandMiddlewareContext as tn, IpcMessageCommand as tt, onApplicationBootstrap as u, UserContextMenuCommandMiddlewareContext as un, AppCommandHandler as ut, FlagStore as v, LoadedCommand as vt, EventFlagContext as w, AsyncFunction as wt, CustomEvaluationFunction as x, RunCommand as xt, CommandFlagContext as y, PreparedAppCommandExecution as yt, isPlugin as z, CommandRegistrar as zt };
2273
+ //# sourceMappingURL=analytics-engine-WQhXmx3H.d.ts.map