commandkit 1.2.0-rc.10 → 1.2.0-rc.12

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 (360) hide show
  1. package/COPYING.md +684 -0
  2. package/dist/{ActionRow-DKnFVDME.d.ts → ActionRow-B-7n9MMr.d.ts} +3 -3
  3. package/dist/{ActionRow-CbdGFWMT.js → ActionRow-uJxU4UGo.js} +2 -2
  4. package/dist/ActionRow-uJxU4UGo.js.map +1 -0
  5. package/dist/{Button-4ZUXdA56.d.ts → Button-RMp-w8HV.d.ts} +4 -4
  6. package/dist/{ButtonKit-C7r7RPNf.d.ts → ButtonKit-9k4yfhYD.d.ts} +2 -2
  7. package/dist/{ChannelSelectMenuKit-BrXvBYNH.d.ts → ChannelSelectMenuKit-CsYgIyKe.d.ts} +3 -3
  8. package/dist/{CommandKitEventsChannel-BtRzr3Tz.js → CommandKitEventsChannel-2l9Za-le.js} +1 -1
  9. package/dist/{CommandKitEventsChannel-BtRzr3Tz.js.map → CommandKitEventsChannel-2l9Za-le.js.map} +1 -1
  10. package/dist/{CommandsRouter-CoOA7hkf.d.ts → CommandsRouter-CBdsqaWK.d.ts} +1 -1
  11. package/dist/{CommandsRouter-Dmzw-ikm.js → CommandsRouter-CWMipIis.js} +1 -1
  12. package/dist/{CommandsRouter-Dmzw-ikm.js.map → CommandsRouter-CWMipIis.js.map} +1 -1
  13. package/dist/{CompilerPlugin-M8r3yNAl.js → CompilerPlugin-CZ4412Zm.js} +2 -2
  14. package/dist/{CompilerPlugin-M8r3yNAl.js.map → CompilerPlugin-CZ4412Zm.js.map} +1 -1
  15. package/dist/{DefaultLogger-XCOl5nLd.d.ts → DefaultLogger-CHMVsizQ.d.ts} +2 -2
  16. package/dist/{EventInterceptor-CQEXyUTp.js → EventInterceptor-BWoEJMHZ.js} +1 -1
  17. package/dist/{EventInterceptor-CQEXyUTp.js.map → EventInterceptor-BWoEJMHZ.js.map} +1 -1
  18. package/dist/{EventWorkerContext-DNWfsE1t.d.ts → EventWorkerContext-CLhZRHhH.d.ts} +3 -3
  19. package/dist/{EventWorkerContext-Dq29tieI.js → EventWorkerContext-D_9q1Bm2.js} +1 -1
  20. package/dist/EventWorkerContext-D_9q1Bm2.js.map +1 -0
  21. package/dist/{EventsRouter-BacqK6z3.d.ts → EventsRouter-4pT6vj-U.d.ts} +1 -1
  22. package/dist/{EventsRouter-3Gygh-km.js → EventsRouter-C04XqRKf.js} +1 -1
  23. package/dist/{EventsRouter-3Gygh-km.js.map → EventsRouter-C04XqRKf.js.map} +1 -1
  24. package/dist/{ILogger-BW8GM-YZ.d.ts → ILogger-BQ2ew4zR.d.ts} +1 -1
  25. package/dist/{Logger-DyfkPk7u.d.ts → Logger-DyV7oli4.d.ts} +2 -2
  26. package/dist/{MentionableSelectMenuKit-CPTKqx-O.d.ts → MentionableSelectMenuKit-CO9phWMf.d.ts} +3 -3
  27. package/dist/{MessageCommandParser-Dl0xxtdr.js → MessageCommandParser-CKh-tM97.js} +52 -53
  28. package/dist/{MessageCommandParser-Dl0xxtdr.js.map → MessageCommandParser-CKh-tM97.js.map} +1 -1
  29. package/dist/{MessageCommandParser-BsGMOTDo.d.ts → MessageCommandParser-DEOl_ifb.d.ts} +1 -1
  30. package/dist/{Modal-C6UTRdYQ.d.ts → Modal-Calb46SJ.d.ts} +11 -8
  31. package/dist/{ModalKit-Btz58KYn.d.ts → ModalKit-Cq2ns6jv.d.ts} +2 -2
  32. package/dist/{PluginCommon-Cvl5yYM_.js → PluginCommon-CPWV5xuX.js} +1 -1
  33. package/dist/{PluginCommon-Cvl5yYM_.js.map → PluginCommon-CPWV5xuX.js.map} +1 -1
  34. package/dist/{RoleSelectMenuKit-C26lU3sN.d.ts → RoleSelectMenuKit-DvBxzpWh.d.ts} +3 -3
  35. package/dist/{RuntimePlugin-BUecuBIU.js → RuntimePlugin-COeXe8rP.js} +2 -2
  36. package/dist/{RuntimePlugin-BUecuBIU.js.map → RuntimePlugin-COeXe8rP.js.map} +1 -1
  37. package/dist/{SelectMenu-Diy87_ba.d.ts → SelectMenu-VcDhOGoJ.d.ts} +8 -8
  38. package/dist/{StringSelectMenuKit-Bhs8U6WI.d.ts → StringSelectMenuKit-CJ0MzUZJ.d.ts} +3 -3
  39. package/dist/{UserSelectMenuKit-CfqFJdxz.d.ts → UserSelectMenuKit-C_J-9RJs.d.ts} +3 -3
  40. package/dist/analytics/analytics-engine.d.ts +31 -29
  41. package/dist/analytics/analytics-engine.js +37 -34
  42. package/dist/analytics/analytics-provider.d.ts +31 -29
  43. package/dist/analytics/constants.js +1 -1
  44. package/dist/analytics/utils.js +37 -34
  45. package/dist/{analytics-engine-jVeSoxEk.d.ts → analytics-engine-NOInIjv8.d.ts} +30 -24
  46. package/dist/app/commands/AppCommandRunner.d.ts +31 -29
  47. package/dist/app/commands/AppCommandRunner.js +37 -34
  48. package/dist/app/commands/Context.d.ts +31 -29
  49. package/dist/app/commands/Context.js +37 -34
  50. package/dist/app/commands/MessageCommandParser.d.ts +1 -1
  51. package/dist/app/commands/MessageCommandParser.js +1 -1
  52. package/dist/app/commands/helpers.d.ts +1 -1
  53. package/dist/app/commands/helpers.js +1 -1
  54. package/dist/app/events/EventWorkerContext.d.ts +32 -30
  55. package/dist/app/events/EventWorkerContext.js +1 -1
  56. package/dist/app/handlers/AppCommandHandler.d.ts +31 -29
  57. package/dist/app/handlers/AppCommandHandler.js +37 -34
  58. package/dist/app/handlers/AppEventsHandler.d.ts +31 -29
  59. package/dist/app/handlers/AppEventsHandler.js +37 -34
  60. package/dist/app/index.d.ts +31 -29
  61. package/dist/app/index.js +38 -35
  62. package/dist/app/interrupt/signals.d.ts +1 -1
  63. package/dist/app/interrupt/signals.js +2 -2
  64. package/dist/app/middlewares/permissions.d.ts +31 -29
  65. package/dist/app/middlewares/permissions.js +37 -34
  66. package/dist/app/register/CommandRegistrar.d.ts +31 -29
  67. package/dist/app/register/CommandRegistrar.js +37 -34
  68. package/dist/app/router/CommandsRouter.d.ts +1 -1
  69. package/dist/app/router/CommandsRouter.js +1 -1
  70. package/dist/app/router/EventsRouter.d.ts +1 -1
  71. package/dist/app/router/EventsRouter.js +1 -1
  72. package/dist/app/router/index.d.ts +3 -3
  73. package/dist/app/router/index.js +3 -3
  74. package/dist/{app-process-cj2vF12T.js → app-process-AQ3Cbf6j.js} +4 -4
  75. package/dist/app-process-AQ3Cbf6j.js.map +1 -0
  76. package/dist/{build-DB_aX5xt.js → build-BYMHMOl_.js} +11 -12
  77. package/dist/{build-DB_aX5xt.js.map → build-BYMHMOl_.js.map} +1 -1
  78. package/dist/cli/app-process.js +5 -5
  79. package/dist/cli/build.d.ts +31 -29
  80. package/dist/cli/build.js +40 -37
  81. package/dist/cli/common.d.ts +31 -29
  82. package/dist/cli/common.js +3 -3
  83. package/dist/cli/development.js +41 -38
  84. package/dist/cli/development.js.map +1 -1
  85. package/dist/cli/env.js +1 -1
  86. package/dist/cli/generators.js +3 -3
  87. package/dist/cli/information.js +2 -2
  88. package/dist/cli/init.d.ts +1 -1
  89. package/dist/cli/init.js +38 -35
  90. package/dist/cli/production.js +43 -41
  91. package/dist/cli/production.js.map +1 -1
  92. package/dist/cli/type-checker.js +4 -4
  93. package/dist/cli/utils.js +1 -1
  94. package/dist/{commandkit-lhbfAyX9.js → commandkit-DabqpQ6v.js} +110 -69
  95. package/dist/commandkit-DabqpQ6v.js.map +1 -0
  96. package/dist/commandkit.d.ts +31 -29
  97. package/dist/commandkit.js +37 -34
  98. package/dist/{common-vnMIelAE.js → common-CCx-FJI4.js} +3 -3
  99. package/dist/common-CCx-FJI4.js.map +1 -0
  100. package/dist/{common-DOCvOVC4.d.ts → common-DHTTnX82.d.ts} +2 -2
  101. package/dist/{common-CrqwC-sx.js → common-fIO6fqGZ.js} +4 -5
  102. package/dist/{common-CrqwC-sx.js.map → common-fIO6fqGZ.js.map} +1 -1
  103. package/dist/components/common/EventInterceptor.js +1 -1
  104. package/dist/components/common/element.d.ts +3 -3
  105. package/dist/components/common/element.js +1 -1
  106. package/dist/components/common/types.js +1 -1
  107. package/dist/components/{v2 → display}/common.d.ts +1 -1
  108. package/dist/components/display/common.js +3 -0
  109. package/dist/components/display/container.d.ts +2 -0
  110. package/dist/components/display/container.js +4 -0
  111. package/dist/components/display/file.d.ts +2 -0
  112. package/dist/components/display/file.js +3 -0
  113. package/dist/components/display/index.d.ts +10 -0
  114. package/dist/components/display/index.js +23 -0
  115. package/dist/components/display/label.d.ts +2 -0
  116. package/dist/components/display/label.js +4 -0
  117. package/dist/components/{v2 → display}/media-gallery.d.ts +1 -1
  118. package/dist/components/{v2 → display}/media-gallery.js +2 -2
  119. package/dist/components/display/poll.d.ts +2 -0
  120. package/dist/components/display/poll.js +5 -0
  121. package/dist/components/display/section.d.ts +2 -0
  122. package/dist/components/display/section.js +5 -0
  123. package/dist/components/display/separator.d.ts +2 -0
  124. package/dist/components/display/separator.js +3 -0
  125. package/dist/components/display/text-display.d.ts +2 -0
  126. package/dist/components/display/text-display.js +3 -0
  127. package/dist/components/index.d.ts +25 -23
  128. package/dist/components/index.js +41 -35
  129. package/dist/components/interactive/action-row/ActionRow.d.ts +6 -0
  130. package/dist/components/interactive/action-row/ActionRow.js +3 -0
  131. package/dist/components/interactive/button/Button.d.ts +7 -0
  132. package/dist/components/interactive/button/Button.js +41 -0
  133. package/dist/components/{v1 → interactive}/button/ButtonKit.d.ts +1 -1
  134. package/dist/components/interactive/button/ButtonKit.js +41 -0
  135. package/dist/components/{v1 → interactive}/modal/Modal.d.ts +4 -4
  136. package/dist/components/interactive/modal/Modal.js +44 -0
  137. package/dist/components/{v1 → interactive}/modal/ModalKit.d.ts +1 -1
  138. package/dist/components/interactive/modal/ModalKit.js +41 -0
  139. package/dist/components/{v1 → interactive}/select-menu/ChannelSelectMenuKit.d.ts +2 -2
  140. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +41 -0
  141. package/dist/components/{v1 → interactive}/select-menu/MentionableSelectMenuKit.d.ts +2 -2
  142. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +41 -0
  143. package/dist/components/{v1 → interactive}/select-menu/RoleSelectMenuKit.d.ts +2 -2
  144. package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +41 -0
  145. package/dist/components/{v1 → interactive}/select-menu/SelectMenu.d.ts +7 -7
  146. package/dist/components/interactive/select-menu/SelectMenu.js +46 -0
  147. package/dist/components/{v1 → interactive}/select-menu/StringSelectMenuKit.d.ts +2 -2
  148. package/dist/components/interactive/select-menu/StringSelectMenuKit.js +41 -0
  149. package/dist/components/{v1 → interactive}/select-menu/UserSelectMenuKit.d.ts +2 -2
  150. package/dist/components/interactive/select-menu/UserSelectMenuKit.js +41 -0
  151. package/dist/components/{v1 → interactive}/select-menu/common.d.ts +1 -1
  152. package/dist/components/interactive/select-menu/common.js +1 -0
  153. package/dist/config/config.d.ts +32 -30
  154. package/dist/config/config.js +37 -34
  155. package/dist/config/default.d.ts +31 -29
  156. package/dist/config/default.js +37 -34
  157. package/dist/config/loader.d.ts +31 -29
  158. package/dist/config/loader.js +37 -34
  159. package/dist/config/types.d.ts +31 -29
  160. package/dist/config/utils.d.ts +31 -29
  161. package/dist/config/utils.js +1 -1
  162. package/dist/{config-YAQdMBqh.d.ts → config-DbgXt6mf.d.ts} +2 -2
  163. package/dist/{constants-4oxxvaJA.js → constants-AH-9qJ89.js} +1 -1
  164. package/dist/{constants-4oxxvaJA.js.map → constants-AH-9qJ89.js.map} +1 -1
  165. package/dist/{constants-B5_Ta7PR.js → constants-BMWH2YUr.js} +1 -1
  166. package/dist/{constants-B5_Ta7PR.js.map → constants-BMWH2YUr.js.map} +1 -1
  167. package/dist/{constants-D8PMA9on.d.ts → constants-CCFSX2NG.d.ts} +1 -1
  168. package/dist/{constants-BOOGN85p.js → constants-D0dawKxO.js} +1 -1
  169. package/dist/{constants-BOOGN85p.js.map → constants-D0dawKxO.js.map} +1 -1
  170. package/dist/{constants-MKu-Q1jh.d.ts → constants-DqnSDZ6l.d.ts} +1 -1
  171. package/dist/{container-DHBELeJ3.d.ts → container-1ltvkavy.d.ts} +2 -2
  172. package/dist/{container-C6GtfAPW.js → container-DC0eQigs.js} +3 -3
  173. package/dist/container-DC0eQigs.js.map +1 -0
  174. package/dist/context/async-context.d.ts +31 -29
  175. package/dist/context/async-context.js +37 -34
  176. package/dist/context/environment.d.ts +31 -29
  177. package/dist/context/environment.js +37 -34
  178. package/dist/{dotprops-tnhpnszJ.js → dotprops-DvJUE8fw.js} +1 -1
  179. package/dist/{dotprops-tnhpnszJ.js.map → dotprops-DvJUE8fw.js.map} +1 -1
  180. package/dist/{element-CAXu1XtK.d.ts → element-CvNhvLZ8.d.ts} +3 -3
  181. package/dist/{element-Bak9llw_.js → element-DibzzA5L.js} +1 -1
  182. package/dist/element-DibzzA5L.js.map +1 -0
  183. package/dist/{env-_68PRRoA.js → env-8yY-6pbC.js} +1 -1
  184. package/dist/{env-_68PRRoA.js.map → env-8yY-6pbC.js.map} +1 -1
  185. package/dist/{error-codes-B4TyW4Ct.d.ts → error-codes-BiNRVMiV.d.ts} +1 -1
  186. package/dist/events/CommandKitEventsChannel.d.ts +31 -29
  187. package/dist/events/CommandKitEventsChannel.js +1 -1
  188. package/dist/{feature-flags-DnnKABHf.js → feature-flags-BoBV4Dsj.js} +4 -4
  189. package/dist/feature-flags-BoBV4Dsj.js.map +1 -0
  190. package/dist/{file-DVOELoNv.js → file-DAUOZYhC.js} +2 -2
  191. package/dist/file-DAUOZYhC.js.map +1 -0
  192. package/dist/{file-DTrr-p09.d.ts → file-n2yl_-vl.d.ts} +2 -2
  193. package/dist/flags/FlagProvider.d.ts +31 -29
  194. package/dist/flags/feature-flags.d.ts +31 -29
  195. package/dist/flags/feature-flags.js +38 -35
  196. package/dist/flags/store.d.ts +31 -29
  197. package/dist/flags/store.js +1 -1
  198. package/dist/{helpers-Dl8wW6aO.js → helpers-D2_1jih6.js} +1 -1
  199. package/dist/{helpers-Dl8wW6aO.js.map → helpers-D2_1jih6.js.map} +1 -1
  200. package/dist/{helpers-Wg6P5fRQ.d.ts → helpers-hDh_tMb6.d.ts} +1 -1
  201. package/dist/index.d.ts +42 -40
  202. package/dist/index.js +46 -39
  203. package/dist/index.js.map +1 -1
  204. package/dist/{init-CY7OJPF-.js → init-CBb0StSB.js} +11 -15
  205. package/dist/{init-CY7OJPF-.js.map → init-CBb0StSB.js.map} +1 -1
  206. package/dist/{init-DOr-Y3GQ.d.ts → init-DSYckXwx.d.ts} +1 -1
  207. package/dist/kv/constants.d.ts +1 -1
  208. package/dist/kv/constants.js +1 -1
  209. package/dist/kv/dotprops.js +1 -1
  210. package/dist/kv/kv.d.ts +2 -2
  211. package/dist/kv/kv.js +5 -7
  212. package/dist/kv/kv.js.map +1 -1
  213. package/dist/kv/serde.d.ts +2 -2
  214. package/dist/kv/serde.js +2 -2
  215. package/dist/label-D-uJWRZ0.js +36 -0
  216. package/dist/label-D-uJWRZ0.js.map +1 -0
  217. package/dist/label-D0KXeBhk.d.ts +29 -0
  218. package/dist/logger/DefaultLogger.d.ts +2 -2
  219. package/dist/logger/DefaultLogger.js +37 -34
  220. package/dist/logger/ILogger.d.ts +1 -1
  221. package/dist/logger/ILogger.js +1 -1
  222. package/dist/logger/Logger.d.ts +2 -2
  223. package/dist/logger/Logger.js +37 -34
  224. package/dist/logger/NoopLogger.d.ts +1 -1
  225. package/dist/{media-gallery-zDtJ3kxb.js → media-gallery-BLhwe5lO.js} +3 -3
  226. package/dist/media-gallery-BLhwe5lO.js.map +1 -0
  227. package/dist/{media-gallery-BMsXSot3.d.ts → media-gallery-BzG70ued.d.ts} +2 -2
  228. package/dist/plugins/CompilerPlugin.d.ts +31 -29
  229. package/dist/plugins/CompilerPlugin.js +2 -2
  230. package/dist/plugins/PluginCommon.d.ts +31 -29
  231. package/dist/plugins/PluginCommon.js +1 -1
  232. package/dist/plugins/RuntimePlugin.d.ts +31 -29
  233. package/dist/plugins/RuntimePlugin.js +2 -2
  234. package/dist/plugins/index.d.ts +31 -29
  235. package/dist/plugins/index.js +37 -34
  236. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +31 -29
  237. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +37 -34
  238. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +31 -29
  239. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +37 -34
  240. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +31 -29
  241. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +37 -34
  242. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +31 -29
  243. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +37 -34
  244. package/dist/plugins/plugin-runtime/runtime.d.ts +31 -29
  245. package/dist/plugins/plugin-runtime/runtime.js +1 -1
  246. package/dist/plugins/types.d.ts +31 -29
  247. package/dist/plugins/types.js +1 -1
  248. package/dist/poll-Bc6rjeUS.js +101 -0
  249. package/dist/poll-Bc6rjeUS.js.map +1 -0
  250. package/dist/poll-HnaJcB0o.d.ts +89 -0
  251. package/dist/{resolve-file-url-ChIyw-Vf.js → resolve-file-url-CJoD0FAn.js} +1 -1
  252. package/dist/{resolve-file-url-ChIyw-Vf.js.map → resolve-file-url-CJoD0FAn.js.map} +1 -1
  253. package/dist/{resolve-file-url-yO8bUxok.d.ts → resolve-file-url-DFtR8jRR.d.ts} +1 -1
  254. package/dist/{section-DlvrDoJK.js → section-BMcHN97i.js} +3 -3
  255. package/dist/section-BMcHN97i.js.map +1 -0
  256. package/dist/{section-Dh_FhPeC.d.ts → section-BOaJKXiy.d.ts} +2 -2
  257. package/dist/{separator-DL6QH5H1.js → separator-C___2K-f.js} +2 -2
  258. package/dist/separator-C___2K-f.js.map +1 -0
  259. package/dist/{separator-CMf6Cyy5.d.ts → separator-Cb7-6T6N.d.ts} +2 -2
  260. package/dist/{serde-BYaKrsOV.d.ts → serde-D4H23l2F.d.ts} +2 -2
  261. package/dist/{serde-Cc8iUa9J.js → serde-DHHwhltz.js} +2 -2
  262. package/dist/{serde-Cc8iUa9J.js.map → serde-DHHwhltz.js.map} +1 -1
  263. package/dist/{signals-ChFMD7mB.js → signals-Cnqe9dFV.js} +2 -2
  264. package/dist/{signals-ChFMD7mB.js.map → signals-Cnqe9dFV.js.map} +1 -1
  265. package/dist/{signals-SHg7J1U_.d.ts → signals-DBS60vTo.d.ts} +1 -1
  266. package/dist/{store-CM6pWVZh.js → store-ZwL2gN6a.js} +1 -1
  267. package/dist/{store-CM6pWVZh.js.map → store-ZwL2gN6a.js.map} +1 -1
  268. package/dist/{text-display-DRw3r_lK.d.ts → text-display-B_hpz50P.d.ts} +2 -2
  269. package/dist/{text-display-DbMumig_.js → text-display-BtQR88kY.js} +2 -2
  270. package/dist/text-display-BtQR88kY.js.map +1 -0
  271. package/dist/{type-checker-ocNSZh0W.js → type-checker-CEFHoQoV.js} +2 -2
  272. package/dist/{type-checker-ocNSZh0W.js.map → type-checker-CEFHoQoV.js.map} +1 -1
  273. package/dist/{types-package-BWArjyBF.js → types-package-D11rQXLs.js} +3 -4
  274. package/dist/{types-package-BWArjyBF.js.map → types-package-D11rQXLs.js.map} +1 -1
  275. package/dist/types.d.ts +32 -30
  276. package/dist/{utilities-DtdPlr4c.d.ts → utilities-CQUaua43.d.ts} +1 -1
  277. package/dist/utils/constants.d.ts +1 -1
  278. package/dist/utils/constants.js +1 -1
  279. package/dist/utils/dev-hooks.d.ts +31 -29
  280. package/dist/utils/dev-hooks.js +37 -34
  281. package/dist/utils/error-codes.d.ts +1 -1
  282. package/dist/utils/resolve-file-url.d.ts +1 -1
  283. package/dist/utils/resolve-file-url.js +1 -1
  284. package/dist/utils/types-package.js +2 -2
  285. package/dist/utils/useful-stuff/async-queue.js +1 -2
  286. package/dist/utils/useful-stuff/async-queue.js.map +1 -1
  287. package/dist/utils/useful-stuff/ratelimiter.js +1 -2
  288. package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
  289. package/dist/utils/useful-stuff/semaphore.js +1 -3
  290. package/dist/utils/useful-stuff/semaphore.js.map +1 -1
  291. package/dist/utils/utilities.d.ts +1 -1
  292. package/dist/utils/utilities.js +37 -34
  293. package/dist/utils/{warn-unstable.d.ts → warning.d.ts} +12 -3
  294. package/dist/utils/warning.js +5 -0
  295. package/dist/{utils-DCSnVAZ6.js → utils-Bf-3Eevb.js} +1 -1
  296. package/dist/{utils-DCSnVAZ6.js.map → utils-Bf-3Eevb.js.map} +1 -1
  297. package/dist/{utils-KsNof0Xz.js → utils-Br3eenD1.js} +1 -1
  298. package/dist/{utils-KsNof0Xz.js.map → utils-Br3eenD1.js.map} +1 -1
  299. package/dist/{version-BCILNeQb.js → version-DC4j2ZwU.js} +2 -2
  300. package/dist/{version-BCILNeQb.js.map → version-DC4j2ZwU.js.map} +1 -1
  301. package/dist/{version-CtJtBJXI.d.ts → version-DggMfP_1.d.ts} +1 -1
  302. package/dist/version.d.ts +1 -1
  303. package/dist/version.js +1 -1
  304. package/dist/warning-CszH8HeS.js +53 -0
  305. package/dist/warning-CszH8HeS.js.map +1 -0
  306. package/package.json +4 -4
  307. package/LICENSE +0 -5
  308. package/dist/ActionRow-CbdGFWMT.js.map +0 -1
  309. package/dist/EventWorkerContext-Dq29tieI.js.map +0 -1
  310. package/dist/app-process-cj2vF12T.js.map +0 -1
  311. package/dist/commandkit-lhbfAyX9.js.map +0 -1
  312. package/dist/common-vnMIelAE.js.map +0 -1
  313. package/dist/components/v1/action-row/ActionRow.d.ts +0 -6
  314. package/dist/components/v1/action-row/ActionRow.js +0 -3
  315. package/dist/components/v1/button/Button.d.ts +0 -7
  316. package/dist/components/v1/button/Button.js +0 -38
  317. package/dist/components/v1/button/ButtonKit.js +0 -38
  318. package/dist/components/v1/modal/Modal.js +0 -41
  319. package/dist/components/v1/modal/ModalKit.js +0 -38
  320. package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +0 -38
  321. package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +0 -38
  322. package/dist/components/v1/select-menu/RoleSelectMenuKit.js +0 -38
  323. package/dist/components/v1/select-menu/SelectMenu.js +0 -43
  324. package/dist/components/v1/select-menu/StringSelectMenuKit.js +0 -38
  325. package/dist/components/v1/select-menu/UserSelectMenuKit.js +0 -38
  326. package/dist/components/v1/select-menu/common.js +0 -1
  327. package/dist/components/v2/common.js +0 -3
  328. package/dist/components/v2/container.d.ts +0 -2
  329. package/dist/components/v2/container.js +0 -4
  330. package/dist/components/v2/file.d.ts +0 -2
  331. package/dist/components/v2/file.js +0 -3
  332. package/dist/components/v2/index.d.ts +0 -8
  333. package/dist/components/v2/index.js +0 -17
  334. package/dist/components/v2/section.d.ts +0 -2
  335. package/dist/components/v2/section.js +0 -5
  336. package/dist/components/v2/separator.d.ts +0 -2
  337. package/dist/components/v2/separator.js +0 -3
  338. package/dist/components/v2/text-display.d.ts +0 -2
  339. package/dist/components/v2/text-display.js +0 -3
  340. package/dist/container-C6GtfAPW.js.map +0 -1
  341. package/dist/element-Bak9llw_.js.map +0 -1
  342. package/dist/feature-flags-DnnKABHf.js.map +0 -1
  343. package/dist/file-DVOELoNv.js.map +0 -1
  344. package/dist/media-gallery-zDtJ3kxb.js.map +0 -1
  345. package/dist/section-DlvrDoJK.js.map +0 -1
  346. package/dist/separator-DL6QH5H1.js.map +0 -1
  347. package/dist/text-display-DbMumig_.js.map +0 -1
  348. package/dist/utils/warn-unstable.js +0 -26
  349. package/dist/utils/warn-unstable.js.map +0 -1
  350. /package/dist/{ILogger-dQ7Y9X1f.js → ILogger-B0q7p7L1.js} +0 -0
  351. /package/dist/{app-HN1cVg8J.js → app-CrjK9yWX.js} +0 -0
  352. /package/dist/{common-CcfjYnPG.js → common-0Iw8ZeM6.js} +0 -0
  353. /package/dist/{router-Dn35v30f.js → display-WDb9wMCv.js} +0 -0
  354. /package/dist/{index-CUPkUUOR.d.ts → index-B5F3AfVc.d.ts} +0 -0
  355. /package/dist/{index-Dw5cCt-A.d.ts → index-BLwMeReG.d.ts} +0 -0
  356. /package/dist/{index-E7Wvm5uX.d.ts → index-h64gcVNJ.d.ts} +0 -0
  357. /package/dist/{runtime-DB9CiPfe.js → router-BvamdzoF.js} +0 -0
  358. /package/dist/{types-CUZOquUl.js → runtime-Skt5NiOc.js} +0 -0
  359. /package/dist/{types-q0Nm882H.js → types-Cdh4uaFR.js} +0 -0
  360. /package/dist/{v2-DofkPKHs.js → types-TC4g3w91.js} +0 -0
@@ -1,24 +1,25 @@
1
1
  const require_chunk = require('./chunk-nOFOJqeH.js');
2
2
  const require_colors = require('./colors-DL3ucTiT.js');
3
3
  const require_error_codes = require('./error-codes-Ds0bnPvT.js');
4
- const require_element = require('./element-Bak9llw_.js');
5
- const require_EventInterceptor = require('./EventInterceptor-CQEXyUTp.js');
6
- const require_constants = require('./constants-B5_Ta7PR.js');
7
- const require_CompilerPlugin = require('./CompilerPlugin-M8r3yNAl.js');
8
- const require_RuntimePlugin = require('./RuntimePlugin-BUecuBIU.js');
9
- const require_resolve_file_url = require('./resolve-file-url-ChIyw-Vf.js');
10
- const require_utils = require('./utils-KsNof0Xz.js');
11
- const require_types_package = require('./types-package-BWArjyBF.js');
12
- const require_constants$1 = require('./constants-BOOGN85p.js');
13
- const require_EventWorkerContext = require('./EventWorkerContext-Dq29tieI.js');
14
- const require_signals = require('./signals-ChFMD7mB.js');
15
- const require_helpers = require('./helpers-Dl8wW6aO.js');
16
- const require_MessageCommandParser = require('./MessageCommandParser-Dl0xxtdr.js');
17
- const require_CommandsRouter = require('./CommandsRouter-Dmzw-ikm.js');
18
- const require_EventsRouter = require('./EventsRouter-3Gygh-km.js');
19
- const require_common = require('./common-CrqwC-sx.js');
20
- const require_CommandKitEventsChannel = require('./CommandKitEventsChannel-BtRzr3Tz.js');
21
- const require_store = require('./store-CM6pWVZh.js');
4
+ const require_warning = require('./warning-CszH8HeS.js');
5
+ const require_element = require('./element-DibzzA5L.js');
6
+ const require_EventInterceptor = require('./EventInterceptor-BWoEJMHZ.js');
7
+ const require_constants = require('./constants-BMWH2YUr.js');
8
+ const require_CompilerPlugin = require('./CompilerPlugin-CZ4412Zm.js');
9
+ const require_RuntimePlugin = require('./RuntimePlugin-COeXe8rP.js');
10
+ const require_resolve_file_url = require('./resolve-file-url-CJoD0FAn.js');
11
+ const require_utils = require('./utils-Br3eenD1.js');
12
+ const require_types_package = require('./types-package-D11rQXLs.js');
13
+ const require_constants$1 = require('./constants-D0dawKxO.js');
14
+ const require_EventWorkerContext = require('./EventWorkerContext-D_9q1Bm2.js');
15
+ const require_signals = require('./signals-Cnqe9dFV.js');
16
+ const require_helpers = require('./helpers-D2_1jih6.js');
17
+ const require_MessageCommandParser = require('./MessageCommandParser-CKh-tM97.js');
18
+ const require_CommandsRouter = require('./CommandsRouter-CWMipIis.js');
19
+ const require_EventsRouter = require('./EventsRouter-C04XqRKf.js');
20
+ const require_common = require('./common-fIO6fqGZ.js');
21
+ const require_CommandKitEventsChannel = require('./CommandKitEventsChannel-2l9Za-le.js');
22
+ const require_store = require('./store-ZwL2gN6a.js');
22
23
  let node_events = require("node:events");
23
24
  node_events = require_chunk.__toESM(node_events);
24
25
  let discord_js = require("discord.js");
@@ -113,7 +114,7 @@ function useStore() {
113
114
  }
114
115
 
115
116
  //#endregion
116
- //#region src/components/v1/button/ButtonKit.ts
117
+ //#region src/components/interactive/button/ButtonKit.ts
117
118
  /**
118
119
  * A builder for creating buttons with additional features like interaction collectors and event handling.
119
120
  */
@@ -208,7 +209,9 @@ var ButtonKit = class extends discord_js.ButtonBuilder {
208
209
  #setupInteractionCollector() {
209
210
  if (this.data.style === discord_js.ButtonStyle.Link || !this.#contextData || !this.#onClickHandler) return;
210
211
  if ((this.customId ?? null) === null) throw new TypeError("Cannot setup \"onClick\" handler on a button without a custom id.");
211
- this.#unsub = this.#getEventInterceptor().subscribe(discord_js.Events.InteractionCreate, async (interaction) => {
212
+ const interceptor = this.#getEventInterceptor();
213
+ if (!interceptor) return;
214
+ this.#unsub = interceptor.subscribe(discord_js.Events.InteractionCreate, async (interaction) => {
212
215
  var _this$contextData5, _this$unsub;
213
216
  if (!interaction.isButton()) return;
214
217
  const myCustomId = this.customId ?? null;
@@ -238,7 +241,7 @@ var ButtonKit = class extends discord_js.ButtonBuilder {
238
241
  };
239
242
 
240
243
  //#endregion
241
- //#region src/components/v1/button/Button.ts
244
+ //#region src/components/interactive/button/Button.ts
242
245
  /**
243
246
  * The button component.
244
247
  * @param props The button properties.
@@ -264,7 +267,7 @@ function Button(props) {
264
267
  }
265
268
 
266
269
  //#endregion
267
- //#region src/components/v1/modal/ModalKit.ts
270
+ //#region src/components/interactive/modal/ModalKit.ts
268
271
  /**
269
272
  * A builder for creating modals with additional features like interaction collectors and event handling.
270
273
  * This class extends the ModalBuilder from discord.js and adds methods for handling interactions.
@@ -389,7 +392,7 @@ var ModalKit = class extends discord_js.ModalBuilder {
389
392
  };
390
393
 
391
394
  //#endregion
392
- //#region src/components/v1/modal/Modal.ts
395
+ //#region src/components/interactive/modal/Modal.ts
393
396
  /**
394
397
  * The modal component.
395
398
  * @param props The modal properties.
@@ -403,11 +406,8 @@ function Modal(props) {
403
406
  if (props.customId) modal.setCustomId(props.customId);
404
407
  if (props.onSubmit) modal.onSubmit(props.onSubmit, props.options);
405
408
  if (props.children) {
406
- const childs = (Array.isArray(props.children) ? props.children : [props.children]).map((c) => {
407
- if (c instanceof discord_js.ActionRowBuilder) return c;
408
- if (c instanceof discord_js.TextInputBuilder) return new discord_js.ActionRowBuilder().addComponents(c);
409
- }).filter((c) => c != null);
410
- modal.addComponents(childs);
409
+ const childs = Array.isArray(props.children) ? props.children : [props.children];
410
+ modal.components.push(...childs);
411
411
  }
412
412
  if (props.onEnd) modal.onEnd(props.onEnd);
413
413
  if (props.onError) modal.onError(props.onError);
@@ -417,12 +417,19 @@ function Modal(props) {
417
417
  * The text input component.
418
418
  * @param props The text input properties.
419
419
  * @returns The commandkit element.
420
- * @example <TextInput customId="input" label="Input" style={TextInputStyle.Short} />
420
+ * @example <TextInput customId="input" style={TextInputStyle.Short} />
421
421
  */
422
422
  function TextInput(props) {
423
423
  const input = new discord_js.TextInputBuilder().setStyle(props.style);
424
424
  if (props.customId) input.setCustomId(props.customId);
425
- if (props.label) input.setLabel(props.label);
425
+ if (props.label) {
426
+ require_warning.warnDeprecated({
427
+ what: "Property `label`",
428
+ where: "<TextInput />",
429
+ message: "Use the <Label /> component instead."
430
+ });
431
+ input.setLabel(props.label);
432
+ }
426
433
  if (props.placeholder) input.setPlaceholder(props.placeholder);
427
434
  if (props.maxLength) input.setMaxLength(props.maxLength);
428
435
  if (props.minLength) input.setMinLength(props.minLength);
@@ -456,7 +463,7 @@ function ParagraphInput(props) {
456
463
  }
457
464
 
458
465
  //#endregion
459
- //#region src/components/v1/select-menu/StringSelectMenuKit.ts
466
+ //#region src/components/interactive/select-menu/StringSelectMenuKit.ts
460
467
  /**
461
468
  * A builder for creating string select menus with additional features like interaction collectors and event handling.
462
469
  * This class extends the StringSelectMenuBuilder from discord.js and adds methods for handling interactions.
@@ -581,7 +588,7 @@ var StringSelectMenuKit = class extends discord_js.StringSelectMenuBuilder {
581
588
  };
582
589
 
583
590
  //#endregion
584
- //#region src/components/v1/select-menu/ChannelSelectMenuKit.ts
591
+ //#region src/components/interactive/select-menu/ChannelSelectMenuKit.ts
585
592
  /**
586
593
  * A builder for creating channel select menus with additional features like interaction collectors and event handling.
587
594
  * This class extends the ChannelSelectMenuBuilder from discord.js and adds methods for handling interactions.
@@ -706,7 +713,7 @@ var ChannelSelectMenuKit = class extends discord_js.ChannelSelectMenuBuilder {
706
713
  };
707
714
 
708
715
  //#endregion
709
- //#region src/components/v1/select-menu/MentionableSelectMenuKit.ts
716
+ //#region src/components/interactive/select-menu/MentionableSelectMenuKit.ts
710
717
  var MentionableSelectMenuKit = class extends discord_js.MentionableSelectMenuBuilder {
711
718
  #onSelectHandler = null;
712
719
  #contextData = {
@@ -826,7 +833,7 @@ var MentionableSelectMenuKit = class extends discord_js.MentionableSelectMenuBui
826
833
  };
827
834
 
828
835
  //#endregion
829
- //#region src/components/v1/select-menu/UserSelectMenuKit.ts
836
+ //#region src/components/interactive/select-menu/UserSelectMenuKit.ts
830
837
  /**
831
838
  * A builder for creating user select menus with additional features like interaction collectors and event handling.
832
839
  * This class extends the UserSelectMenuBuilder from discord.js and adds methods for handling interactions.
@@ -951,7 +958,7 @@ var UserSelectMenuKit = class extends discord_js.UserSelectMenuBuilder {
951
958
  };
952
959
 
953
960
  //#endregion
954
- //#region src/components/v1/select-menu/RoleSelectMenuKit.ts
961
+ //#region src/components/interactive/select-menu/RoleSelectMenuKit.ts
955
962
  /**
956
963
  * A builder for creating role select menus with additional features like interaction collectors and event handling.
957
964
  * This class extends the RoleSelectMenuBuilder from discord.js and adds methods for handling interactions.
@@ -1076,7 +1083,7 @@ var RoleSelectMenuKit = class extends discord_js.RoleSelectMenuBuilder {
1076
1083
  };
1077
1084
 
1078
1085
  //#endregion
1079
- //#region src/components/v1/select-menu/SelectMenu.ts
1086
+ //#region src/components/interactive/select-menu/SelectMenu.ts
1080
1087
  /**
1081
1088
  * @private
1082
1089
  */
@@ -1250,11 +1257,7 @@ var DefaultLogger = class {
1250
1257
  this.logger = new console.Console(this.stdout, this.stderr);
1251
1258
  }
1252
1259
  _formatTime(date) {
1253
- const hours = date.getHours().toString().padStart(2, "0");
1254
- const minutes = date.getMinutes().toString().padStart(2, "0");
1255
- const seconds = date.getSeconds().toString().padStart(2, "0");
1256
- const millis = date.getMilliseconds().toString().padStart(3, "0");
1257
- return `${hours}:${minutes}:${seconds}.${millis}`;
1260
+ return `${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}:${date.getSeconds().toString().padStart(2, "0")}.${date.getMilliseconds().toString().padStart(3, "0")}`;
1258
1261
  }
1259
1262
  _getContext() {
1260
1263
  const ctx = getContext();
@@ -1830,8 +1833,7 @@ function getSrcDir() {
1830
1833
  */
1831
1834
  function getCurrentDirectory() {
1832
1835
  if (currentDir) return currentDir;
1833
- const src = getSrcDir();
1834
- let root = (0, node_path.join)(require_constants.COMMANDKIT_CWD, src);
1836
+ let root = (0, node_path.join)(require_constants.COMMANDKIT_CWD, getSrcDir());
1835
1837
  if (!(0, node_fs.existsSync)(root)) root = require_constants.COMMANDKIT_CWD;
1836
1838
  currentDir = root;
1837
1839
  return root;
@@ -1888,8 +1890,7 @@ function debounce(fn, ms) {
1888
1890
  return new Promise((res) => {
1889
1891
  resolve = res;
1890
1892
  timer = setTimeout(() => {
1891
- const result = fn(...args);
1892
- res(result);
1893
+ res(fn(...args));
1893
1894
  timer = null;
1894
1895
  resolve = null;
1895
1896
  }, ms);
@@ -2294,7 +2295,15 @@ var Context = class Context {
2294
2295
  */
2295
2296
  get commandName() {
2296
2297
  if (this.isInteraction()) return this.interaction.commandName;
2297
- else return this.config.messageCommandParser.getCommand();
2298
+ const maybeAlias = this.config.messageCommandParser.getCommand();
2299
+ return this.commandkit.commandHandler.resolveMessageCommandName(maybeAlias);
2300
+ }
2301
+ /**
2302
+ * Gets the invoked command name (could be an alias for message commands)
2303
+ */
2304
+ get invokedCommandName() {
2305
+ if (this.isInteraction()) return this.interaction.commandName;
2306
+ return this.config.messageCommandParser.getCommand();
2298
2307
  }
2299
2308
  /**
2300
2309
  * Gets the command options based on the execution mode.
@@ -2733,11 +2742,17 @@ var CommandRegistrar = class {
2733
2742
  return this.commandkit.commandHandler.getCommandsArray().flatMap((cmd) => {
2734
2743
  const json = "toJSON" in cmd.data.command ? cmd.data.command.toJSON() : cmd.data.command;
2735
2744
  const __metadata = cmd.metadata ?? cmd.data.metadata;
2736
- const collections = [{
2745
+ const collections = [];
2746
+ if (cmd.data.chatInput) collections.push({
2737
2747
  ...json,
2738
- __metadata
2739
- }];
2740
- if (cmd.data.userContextMenu && json.type !== discord_js.ApplicationCommandType.User) {
2748
+ type: discord_js.ApplicationCommandType.ChatInput,
2749
+ description: json.description ?? "No command description set.",
2750
+ __metadata,
2751
+ __applyId: (id) => {
2752
+ cmd.discordId = id;
2753
+ }
2754
+ });
2755
+ if (cmd.data.userContextMenu) {
2741
2756
  var _metadata$nameAliases;
2742
2757
  collections.push({
2743
2758
  ...json,
@@ -2746,10 +2761,13 @@ var CommandRegistrar = class {
2746
2761
  options: void 0,
2747
2762
  description_localizations: void 0,
2748
2763
  description: void 0,
2749
- __metadata
2764
+ __metadata,
2765
+ __applyId: (id) => {
2766
+ cmd.discordId = id;
2767
+ }
2750
2768
  });
2751
2769
  }
2752
- if (cmd.data.messageContextMenu && json.type !== discord_js.ApplicationCommandType.Message) {
2770
+ if (cmd.data.messageContextMenu) {
2753
2771
  var _metadata$nameAliases2;
2754
2772
  collections.push({
2755
2773
  ...json,
@@ -2758,7 +2776,10 @@ var CommandRegistrar = class {
2758
2776
  description_localizations: void 0,
2759
2777
  description: void 0,
2760
2778
  options: void 0,
2761
- __metadata
2779
+ __metadata,
2780
+ __applyId: (id) => {
2781
+ cmd.discordId = id;
2782
+ }
2762
2783
  });
2763
2784
  }
2764
2785
  return collections;
@@ -2818,8 +2839,16 @@ var CommandRegistrar = class {
2818
2839
  try {
2819
2840
  const data = await this.api.put(discord_js.Routes.applicationCommands(this.commandkit.client.user.id), { body: commands.map((c) => ({
2820
2841
  ...c,
2821
- __metadata: void 0
2842
+ __metadata: void 0,
2843
+ __applyId: void 0
2822
2844
  })) });
2845
+ data.forEach((c) => {
2846
+ var _cmd$__applyId;
2847
+ if (!c.id) return;
2848
+ const cmd = commands.find((co) => co.name === c.name && co.type === c.type);
2849
+ if (!cmd) return;
2850
+ (_cmd$__applyId = cmd.__applyId) === null || _cmd$__applyId === void 0 || _cmd$__applyId.call(cmd, c.id);
2851
+ });
2823
2852
  Logger.info(`✨ Refreshed ${data.length} global application (/) commands`);
2824
2853
  } catch (e) {
2825
2854
  Logger.error`Failed to update global application (/) commands: ${e}`;
@@ -2869,8 +2898,16 @@ var CommandRegistrar = class {
2869
2898
  if (prevented$1) continue;
2870
2899
  const data = await this.api.put(discord_js.Routes.applicationGuildCommands(this.commandkit.client.user.id, guild), { body: guildCommands.map((b) => ({
2871
2900
  ...b,
2872
- __metadata: void 0
2901
+ __metadata: void 0,
2902
+ __applyId: void 0
2873
2903
  })) });
2904
+ data.forEach((c) => {
2905
+ var _cmd$__applyId2;
2906
+ if (!c.id) return;
2907
+ const cmd = commands.find((co) => co.name === c.name && co.type === c.type);
2908
+ if (!cmd) return;
2909
+ (_cmd$__applyId2 = cmd.__applyId) === null || _cmd$__applyId2 === void 0 || _cmd$__applyId2.call(cmd, c.id);
2910
+ });
2874
2911
  count += data.length;
2875
2912
  }
2876
2913
  Logger.info(`✨ Refreshed ${count} guild application (/) commands`);
@@ -3011,8 +3048,7 @@ var AppCommandHandler = class {
3011
3048
  if (hasChildren) {
3012
3049
  const children = categoryTree[category].sort();
3013
3050
  children.forEach((childCategory, idx) => {
3014
- const childIsLast = idx === children.length - 1;
3015
- printCategory(childCategory, childIndent, childIsLast, childIndent);
3051
+ printCategory(childCategory, childIndent, idx === children.length - 1, childIndent);
3016
3052
  });
3017
3053
  }
3018
3054
  };
@@ -3029,8 +3065,7 @@ var AppCommandHandler = class {
3029
3065
  return true;
3030
3066
  }).sort();
3031
3067
  topLevelCategories.forEach((category, index) => {
3032
- const isLast = index === topLevelCategories.length - 1;
3033
- printCategory(category, "", isLast);
3068
+ printCategory(category, "", index === topLevelCategories.length - 1);
3034
3069
  });
3035
3070
  }
3036
3071
  /**
@@ -3155,6 +3190,15 @@ var AppCommandHandler = class {
3155
3190
  }
3156
3191
  return null;
3157
3192
  }
3193
+ resolveMessageCommandName(name) {
3194
+ for (const [, loadedCommand] of this.loadedCommands) {
3195
+ var _loadedCommand$data$m3;
3196
+ if (loadedCommand.data.command.name === name) return loadedCommand.data.command.name;
3197
+ const aliases = (_loadedCommand$data$m3 = loadedCommand.data.metadata) === null || _loadedCommand$data$m3 === void 0 ? void 0 : _loadedCommand$data$m3.aliases;
3198
+ if (aliases && Array.isArray(aliases) && aliases.includes(name)) return loadedCommand.data.command.name;
3199
+ }
3200
+ return name;
3201
+ }
3158
3202
  /**
3159
3203
  * Reloads all commands and middleware from scratch.
3160
3204
  */
@@ -3216,8 +3260,7 @@ var AppCommandHandler = class {
3216
3260
  if (require_constants.COMMANDKIT_IS_DEV) {
3217
3261
  const commandNames = Array.from(this.loadedCommands.values()).map((v) => v.data.command.name);
3218
3262
  const aliases = Array.from(this.loadedCommands.values()).flatMap((v) => v.metadata.aliases || []);
3219
- const allNames = [...commandNames, ...aliases];
3220
- await require_types_package.rewriteCommandDeclaration(`type CommandTypeData = ${allNames.map((name) => JSON.stringify(name)).join(" | ")}`);
3263
+ await require_types_package.rewriteCommandDeclaration(`type CommandTypeData = ${[...commandNames, ...aliases].map((name) => JSON.stringify(name)).join(" | ")}`);
3221
3264
  }
3222
3265
  await this.commandkit.plugins.execute((ctx, plugin) => {
3223
3266
  return plugin.onAfterCommandsLoad(ctx);
@@ -3252,6 +3295,7 @@ var AppCommandHandler = class {
3252
3295
  try {
3253
3296
  if (command.path === null) {
3254
3297
  this.loadedCommands.set(id, {
3298
+ discordId: null,
3255
3299
  command,
3256
3300
  metadata: {
3257
3301
  guilds: [],
@@ -3259,11 +3303,7 @@ var AppCommandHandler = class {
3259
3303
  userPermissions: [],
3260
3304
  botPermissions: []
3261
3305
  },
3262
- data: { command: {
3263
- name: command.name,
3264
- description: `${command.name} command`,
3265
- type: 1
3266
- } }
3306
+ data: { command: { name: command.name } }
3267
3307
  });
3268
3308
  return;
3269
3309
  }
@@ -3279,7 +3319,8 @@ var AppCommandHandler = class {
3279
3319
  botPermissions: []
3280
3320
  };
3281
3321
  const commandName = commandFileData.command.name || command.name;
3282
- const commandDescription = commandFileData.command.description || `${commandName} command`;
3322
+ let commandDescription = commandFileData.command.description;
3323
+ if (!commandDescription && commandFileData.chatInput) commandDescription = "No command description set.";
3283
3324
  const updatedCommandData = {
3284
3325
  ...commandFileData.command,
3285
3326
  name: commandName,
@@ -3302,6 +3343,7 @@ var AppCommandHandler = class {
3302
3343
  const commandJson = "toJSON" in lastUpdated && typeof lastUpdated.toJSON === "function" ? lastUpdated.toJSON() : lastUpdated;
3303
3344
  if ("guilds" in commandJson || "aliases" in commandJson) Logger.warn(`Command \`${command.name}\` uses deprecated metadata properties. Please update to use the new \`metadata\` object or \`generateMetadata\` function.`);
3304
3345
  this.loadedCommands.set(id, {
3346
+ discordId: null,
3305
3347
  command,
3306
3348
  metadata: {
3307
3349
  guilds: commandJson.guilds,
@@ -3877,7 +3919,6 @@ var CommandKit = class CommandKit extends node_events.default {
3877
3919
  /**
3878
3920
  * Create a new command and event handler with CommandKit.
3879
3921
  * @param options - The default CommandKit configuration.
3880
- * @see {@link https://commandkit.js.org/docs/guide/commandkit-setup}
3881
3922
  */
3882
3923
  constructor(options = {}) {
3883
3924
  if (CommandKit.instance) process.emitWarning("CommandKit instance already exists. Having multiple instance in same project is discouraged and it may lead to unexpected behavior.", { code: "MultiInstanceWarning" });
@@ -4482,4 +4523,4 @@ Object.defineProperty(exports, 'useStore', {
4482
4523
  return useStore;
4483
4524
  }
4484
4525
  });
4485
- //# sourceMappingURL=commandkit-lhbfAyX9.js.map
4526
+ //# sourceMappingURL=commandkit-DabqpQ6v.js.map