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.
- package/COPYING.md +684 -0
- package/dist/{ActionRow-DKnFVDME.d.ts → ActionRow-B-7n9MMr.d.ts} +3 -3
- package/dist/{ActionRow-CbdGFWMT.js → ActionRow-uJxU4UGo.js} +2 -2
- package/dist/ActionRow-uJxU4UGo.js.map +1 -0
- package/dist/{Button-4ZUXdA56.d.ts → Button-RMp-w8HV.d.ts} +4 -4
- package/dist/{ButtonKit-C7r7RPNf.d.ts → ButtonKit-9k4yfhYD.d.ts} +2 -2
- package/dist/{ChannelSelectMenuKit-BrXvBYNH.d.ts → ChannelSelectMenuKit-CsYgIyKe.d.ts} +3 -3
- package/dist/{CommandKitEventsChannel-BtRzr3Tz.js → CommandKitEventsChannel-2l9Za-le.js} +1 -1
- package/dist/{CommandKitEventsChannel-BtRzr3Tz.js.map → CommandKitEventsChannel-2l9Za-le.js.map} +1 -1
- package/dist/{CommandsRouter-CoOA7hkf.d.ts → CommandsRouter-CBdsqaWK.d.ts} +1 -1
- package/dist/{CommandsRouter-Dmzw-ikm.js → CommandsRouter-CWMipIis.js} +1 -1
- package/dist/{CommandsRouter-Dmzw-ikm.js.map → CommandsRouter-CWMipIis.js.map} +1 -1
- package/dist/{CompilerPlugin-M8r3yNAl.js → CompilerPlugin-CZ4412Zm.js} +2 -2
- package/dist/{CompilerPlugin-M8r3yNAl.js.map → CompilerPlugin-CZ4412Zm.js.map} +1 -1
- package/dist/{DefaultLogger-XCOl5nLd.d.ts → DefaultLogger-CHMVsizQ.d.ts} +2 -2
- package/dist/{EventInterceptor-CQEXyUTp.js → EventInterceptor-BWoEJMHZ.js} +1 -1
- package/dist/{EventInterceptor-CQEXyUTp.js.map → EventInterceptor-BWoEJMHZ.js.map} +1 -1
- package/dist/{EventWorkerContext-DNWfsE1t.d.ts → EventWorkerContext-CLhZRHhH.d.ts} +3 -3
- package/dist/{EventWorkerContext-Dq29tieI.js → EventWorkerContext-D_9q1Bm2.js} +1 -1
- package/dist/EventWorkerContext-D_9q1Bm2.js.map +1 -0
- package/dist/{EventsRouter-BacqK6z3.d.ts → EventsRouter-4pT6vj-U.d.ts} +1 -1
- package/dist/{EventsRouter-3Gygh-km.js → EventsRouter-C04XqRKf.js} +1 -1
- package/dist/{EventsRouter-3Gygh-km.js.map → EventsRouter-C04XqRKf.js.map} +1 -1
- package/dist/{ILogger-BW8GM-YZ.d.ts → ILogger-BQ2ew4zR.d.ts} +1 -1
- package/dist/{Logger-DyfkPk7u.d.ts → Logger-DyV7oli4.d.ts} +2 -2
- package/dist/{MentionableSelectMenuKit-CPTKqx-O.d.ts → MentionableSelectMenuKit-CO9phWMf.d.ts} +3 -3
- package/dist/{MessageCommandParser-Dl0xxtdr.js → MessageCommandParser-CKh-tM97.js} +52 -53
- package/dist/{MessageCommandParser-Dl0xxtdr.js.map → MessageCommandParser-CKh-tM97.js.map} +1 -1
- package/dist/{MessageCommandParser-BsGMOTDo.d.ts → MessageCommandParser-DEOl_ifb.d.ts} +1 -1
- package/dist/{Modal-C6UTRdYQ.d.ts → Modal-Calb46SJ.d.ts} +11 -8
- package/dist/{ModalKit-Btz58KYn.d.ts → ModalKit-Cq2ns6jv.d.ts} +2 -2
- package/dist/{PluginCommon-Cvl5yYM_.js → PluginCommon-CPWV5xuX.js} +1 -1
- package/dist/{PluginCommon-Cvl5yYM_.js.map → PluginCommon-CPWV5xuX.js.map} +1 -1
- package/dist/{RoleSelectMenuKit-C26lU3sN.d.ts → RoleSelectMenuKit-DvBxzpWh.d.ts} +3 -3
- package/dist/{RuntimePlugin-BUecuBIU.js → RuntimePlugin-COeXe8rP.js} +2 -2
- package/dist/{RuntimePlugin-BUecuBIU.js.map → RuntimePlugin-COeXe8rP.js.map} +1 -1
- package/dist/{SelectMenu-Diy87_ba.d.ts → SelectMenu-VcDhOGoJ.d.ts} +8 -8
- package/dist/{StringSelectMenuKit-Bhs8U6WI.d.ts → StringSelectMenuKit-CJ0MzUZJ.d.ts} +3 -3
- package/dist/{UserSelectMenuKit-CfqFJdxz.d.ts → UserSelectMenuKit-C_J-9RJs.d.ts} +3 -3
- package/dist/analytics/analytics-engine.d.ts +31 -29
- package/dist/analytics/analytics-engine.js +37 -34
- package/dist/analytics/analytics-provider.d.ts +31 -29
- package/dist/analytics/constants.js +1 -1
- package/dist/analytics/utils.js +37 -34
- package/dist/{analytics-engine-jVeSoxEk.d.ts → analytics-engine-NOInIjv8.d.ts} +30 -24
- package/dist/app/commands/AppCommandRunner.d.ts +31 -29
- package/dist/app/commands/AppCommandRunner.js +37 -34
- package/dist/app/commands/Context.d.ts +31 -29
- package/dist/app/commands/Context.js +37 -34
- package/dist/app/commands/MessageCommandParser.d.ts +1 -1
- package/dist/app/commands/MessageCommandParser.js +1 -1
- package/dist/app/commands/helpers.d.ts +1 -1
- package/dist/app/commands/helpers.js +1 -1
- package/dist/app/events/EventWorkerContext.d.ts +32 -30
- package/dist/app/events/EventWorkerContext.js +1 -1
- package/dist/app/handlers/AppCommandHandler.d.ts +31 -29
- package/dist/app/handlers/AppCommandHandler.js +37 -34
- package/dist/app/handlers/AppEventsHandler.d.ts +31 -29
- package/dist/app/handlers/AppEventsHandler.js +37 -34
- package/dist/app/index.d.ts +31 -29
- package/dist/app/index.js +38 -35
- package/dist/app/interrupt/signals.d.ts +1 -1
- package/dist/app/interrupt/signals.js +2 -2
- package/dist/app/middlewares/permissions.d.ts +31 -29
- package/dist/app/middlewares/permissions.js +37 -34
- package/dist/app/register/CommandRegistrar.d.ts +31 -29
- package/dist/app/register/CommandRegistrar.js +37 -34
- package/dist/app/router/CommandsRouter.d.ts +1 -1
- package/dist/app/router/CommandsRouter.js +1 -1
- package/dist/app/router/EventsRouter.d.ts +1 -1
- package/dist/app/router/EventsRouter.js +1 -1
- package/dist/app/router/index.d.ts +3 -3
- package/dist/app/router/index.js +3 -3
- package/dist/{app-process-cj2vF12T.js → app-process-AQ3Cbf6j.js} +4 -4
- package/dist/app-process-AQ3Cbf6j.js.map +1 -0
- package/dist/{build-DB_aX5xt.js → build-BYMHMOl_.js} +11 -12
- package/dist/{build-DB_aX5xt.js.map → build-BYMHMOl_.js.map} +1 -1
- package/dist/cli/app-process.js +5 -5
- package/dist/cli/build.d.ts +31 -29
- package/dist/cli/build.js +40 -37
- package/dist/cli/common.d.ts +31 -29
- package/dist/cli/common.js +3 -3
- package/dist/cli/development.js +41 -38
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/env.js +1 -1
- package/dist/cli/generators.js +3 -3
- package/dist/cli/information.js +2 -2
- package/dist/cli/init.d.ts +1 -1
- package/dist/cli/init.js +38 -35
- package/dist/cli/production.js +43 -41
- package/dist/cli/production.js.map +1 -1
- package/dist/cli/type-checker.js +4 -4
- package/dist/cli/utils.js +1 -1
- package/dist/{commandkit-lhbfAyX9.js → commandkit-DabqpQ6v.js} +110 -69
- package/dist/commandkit-DabqpQ6v.js.map +1 -0
- package/dist/commandkit.d.ts +31 -29
- package/dist/commandkit.js +37 -34
- package/dist/{common-vnMIelAE.js → common-CCx-FJI4.js} +3 -3
- package/dist/common-CCx-FJI4.js.map +1 -0
- package/dist/{common-DOCvOVC4.d.ts → common-DHTTnX82.d.ts} +2 -2
- package/dist/{common-CrqwC-sx.js → common-fIO6fqGZ.js} +4 -5
- package/dist/{common-CrqwC-sx.js.map → common-fIO6fqGZ.js.map} +1 -1
- package/dist/components/common/EventInterceptor.js +1 -1
- package/dist/components/common/element.d.ts +3 -3
- package/dist/components/common/element.js +1 -1
- package/dist/components/common/types.js +1 -1
- package/dist/components/{v2 → display}/common.d.ts +1 -1
- package/dist/components/display/common.js +3 -0
- package/dist/components/display/container.d.ts +2 -0
- package/dist/components/display/container.js +4 -0
- package/dist/components/display/file.d.ts +2 -0
- package/dist/components/display/file.js +3 -0
- package/dist/components/display/index.d.ts +10 -0
- package/dist/components/display/index.js +23 -0
- package/dist/components/display/label.d.ts +2 -0
- package/dist/components/display/label.js +4 -0
- package/dist/components/{v2 → display}/media-gallery.d.ts +1 -1
- package/dist/components/{v2 → display}/media-gallery.js +2 -2
- package/dist/components/display/poll.d.ts +2 -0
- package/dist/components/display/poll.js +5 -0
- package/dist/components/display/section.d.ts +2 -0
- package/dist/components/display/section.js +5 -0
- package/dist/components/display/separator.d.ts +2 -0
- package/dist/components/display/separator.js +3 -0
- package/dist/components/display/text-display.d.ts +2 -0
- package/dist/components/display/text-display.js +3 -0
- package/dist/components/index.d.ts +25 -23
- package/dist/components/index.js +41 -35
- package/dist/components/interactive/action-row/ActionRow.d.ts +6 -0
- package/dist/components/interactive/action-row/ActionRow.js +3 -0
- package/dist/components/interactive/button/Button.d.ts +7 -0
- package/dist/components/interactive/button/Button.js +41 -0
- package/dist/components/{v1 → interactive}/button/ButtonKit.d.ts +1 -1
- package/dist/components/interactive/button/ButtonKit.js +41 -0
- package/dist/components/{v1 → interactive}/modal/Modal.d.ts +4 -4
- package/dist/components/interactive/modal/Modal.js +44 -0
- package/dist/components/{v1 → interactive}/modal/ModalKit.d.ts +1 -1
- package/dist/components/interactive/modal/ModalKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/ChannelSelectMenuKit.d.ts +2 -2
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/MentionableSelectMenuKit.d.ts +2 -2
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/RoleSelectMenuKit.d.ts +2 -2
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/SelectMenu.d.ts +7 -7
- package/dist/components/interactive/select-menu/SelectMenu.js +46 -0
- package/dist/components/{v1 → interactive}/select-menu/StringSelectMenuKit.d.ts +2 -2
- package/dist/components/interactive/select-menu/StringSelectMenuKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/UserSelectMenuKit.d.ts +2 -2
- package/dist/components/interactive/select-menu/UserSelectMenuKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/common.d.ts +1 -1
- package/dist/components/interactive/select-menu/common.js +1 -0
- package/dist/config/config.d.ts +32 -30
- package/dist/config/config.js +37 -34
- package/dist/config/default.d.ts +31 -29
- package/dist/config/default.js +37 -34
- package/dist/config/loader.d.ts +31 -29
- package/dist/config/loader.js +37 -34
- package/dist/config/types.d.ts +31 -29
- package/dist/config/utils.d.ts +31 -29
- package/dist/config/utils.js +1 -1
- package/dist/{config-YAQdMBqh.d.ts → config-DbgXt6mf.d.ts} +2 -2
- package/dist/{constants-4oxxvaJA.js → constants-AH-9qJ89.js} +1 -1
- package/dist/{constants-4oxxvaJA.js.map → constants-AH-9qJ89.js.map} +1 -1
- package/dist/{constants-B5_Ta7PR.js → constants-BMWH2YUr.js} +1 -1
- package/dist/{constants-B5_Ta7PR.js.map → constants-BMWH2YUr.js.map} +1 -1
- package/dist/{constants-D8PMA9on.d.ts → constants-CCFSX2NG.d.ts} +1 -1
- package/dist/{constants-BOOGN85p.js → constants-D0dawKxO.js} +1 -1
- package/dist/{constants-BOOGN85p.js.map → constants-D0dawKxO.js.map} +1 -1
- package/dist/{constants-MKu-Q1jh.d.ts → constants-DqnSDZ6l.d.ts} +1 -1
- package/dist/{container-DHBELeJ3.d.ts → container-1ltvkavy.d.ts} +2 -2
- package/dist/{container-C6GtfAPW.js → container-DC0eQigs.js} +3 -3
- package/dist/container-DC0eQigs.js.map +1 -0
- package/dist/context/async-context.d.ts +31 -29
- package/dist/context/async-context.js +37 -34
- package/dist/context/environment.d.ts +31 -29
- package/dist/context/environment.js +37 -34
- package/dist/{dotprops-tnhpnszJ.js → dotprops-DvJUE8fw.js} +1 -1
- package/dist/{dotprops-tnhpnszJ.js.map → dotprops-DvJUE8fw.js.map} +1 -1
- package/dist/{element-CAXu1XtK.d.ts → element-CvNhvLZ8.d.ts} +3 -3
- package/dist/{element-Bak9llw_.js → element-DibzzA5L.js} +1 -1
- package/dist/element-DibzzA5L.js.map +1 -0
- package/dist/{env-_68PRRoA.js → env-8yY-6pbC.js} +1 -1
- package/dist/{env-_68PRRoA.js.map → env-8yY-6pbC.js.map} +1 -1
- package/dist/{error-codes-B4TyW4Ct.d.ts → error-codes-BiNRVMiV.d.ts} +1 -1
- package/dist/events/CommandKitEventsChannel.d.ts +31 -29
- package/dist/events/CommandKitEventsChannel.js +1 -1
- package/dist/{feature-flags-DnnKABHf.js → feature-flags-BoBV4Dsj.js} +4 -4
- package/dist/feature-flags-BoBV4Dsj.js.map +1 -0
- package/dist/{file-DVOELoNv.js → file-DAUOZYhC.js} +2 -2
- package/dist/file-DAUOZYhC.js.map +1 -0
- package/dist/{file-DTrr-p09.d.ts → file-n2yl_-vl.d.ts} +2 -2
- package/dist/flags/FlagProvider.d.ts +31 -29
- package/dist/flags/feature-flags.d.ts +31 -29
- package/dist/flags/feature-flags.js +38 -35
- package/dist/flags/store.d.ts +31 -29
- package/dist/flags/store.js +1 -1
- package/dist/{helpers-Dl8wW6aO.js → helpers-D2_1jih6.js} +1 -1
- package/dist/{helpers-Dl8wW6aO.js.map → helpers-D2_1jih6.js.map} +1 -1
- package/dist/{helpers-Wg6P5fRQ.d.ts → helpers-hDh_tMb6.d.ts} +1 -1
- package/dist/index.d.ts +42 -40
- package/dist/index.js +46 -39
- package/dist/index.js.map +1 -1
- package/dist/{init-CY7OJPF-.js → init-CBb0StSB.js} +11 -15
- package/dist/{init-CY7OJPF-.js.map → init-CBb0StSB.js.map} +1 -1
- package/dist/{init-DOr-Y3GQ.d.ts → init-DSYckXwx.d.ts} +1 -1
- package/dist/kv/constants.d.ts +1 -1
- package/dist/kv/constants.js +1 -1
- package/dist/kv/dotprops.js +1 -1
- package/dist/kv/kv.d.ts +2 -2
- package/dist/kv/kv.js +5 -7
- package/dist/kv/kv.js.map +1 -1
- package/dist/kv/serde.d.ts +2 -2
- package/dist/kv/serde.js +2 -2
- package/dist/label-D-uJWRZ0.js +36 -0
- package/dist/label-D-uJWRZ0.js.map +1 -0
- package/dist/label-D0KXeBhk.d.ts +29 -0
- package/dist/logger/DefaultLogger.d.ts +2 -2
- package/dist/logger/DefaultLogger.js +37 -34
- package/dist/logger/ILogger.d.ts +1 -1
- package/dist/logger/ILogger.js +1 -1
- package/dist/logger/Logger.d.ts +2 -2
- package/dist/logger/Logger.js +37 -34
- package/dist/logger/NoopLogger.d.ts +1 -1
- package/dist/{media-gallery-zDtJ3kxb.js → media-gallery-BLhwe5lO.js} +3 -3
- package/dist/media-gallery-BLhwe5lO.js.map +1 -0
- package/dist/{media-gallery-BMsXSot3.d.ts → media-gallery-BzG70ued.d.ts} +2 -2
- package/dist/plugins/CompilerPlugin.d.ts +31 -29
- package/dist/plugins/CompilerPlugin.js +2 -2
- package/dist/plugins/PluginCommon.d.ts +31 -29
- package/dist/plugins/PluginCommon.js +1 -1
- package/dist/plugins/RuntimePlugin.d.ts +31 -29
- package/dist/plugins/RuntimePlugin.js +2 -2
- package/dist/plugins/index.d.ts +31 -29
- package/dist/plugins/index.js +37 -34
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +31 -29
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +37 -34
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +31 -29
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +37 -34
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +31 -29
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +37 -34
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +31 -29
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +37 -34
- package/dist/plugins/plugin-runtime/runtime.d.ts +31 -29
- package/dist/plugins/plugin-runtime/runtime.js +1 -1
- package/dist/plugins/types.d.ts +31 -29
- package/dist/plugins/types.js +1 -1
- package/dist/poll-Bc6rjeUS.js +101 -0
- package/dist/poll-Bc6rjeUS.js.map +1 -0
- package/dist/poll-HnaJcB0o.d.ts +89 -0
- package/dist/{resolve-file-url-ChIyw-Vf.js → resolve-file-url-CJoD0FAn.js} +1 -1
- package/dist/{resolve-file-url-ChIyw-Vf.js.map → resolve-file-url-CJoD0FAn.js.map} +1 -1
- package/dist/{resolve-file-url-yO8bUxok.d.ts → resolve-file-url-DFtR8jRR.d.ts} +1 -1
- package/dist/{section-DlvrDoJK.js → section-BMcHN97i.js} +3 -3
- package/dist/section-BMcHN97i.js.map +1 -0
- package/dist/{section-Dh_FhPeC.d.ts → section-BOaJKXiy.d.ts} +2 -2
- package/dist/{separator-DL6QH5H1.js → separator-C___2K-f.js} +2 -2
- package/dist/separator-C___2K-f.js.map +1 -0
- package/dist/{separator-CMf6Cyy5.d.ts → separator-Cb7-6T6N.d.ts} +2 -2
- package/dist/{serde-BYaKrsOV.d.ts → serde-D4H23l2F.d.ts} +2 -2
- package/dist/{serde-Cc8iUa9J.js → serde-DHHwhltz.js} +2 -2
- package/dist/{serde-Cc8iUa9J.js.map → serde-DHHwhltz.js.map} +1 -1
- package/dist/{signals-ChFMD7mB.js → signals-Cnqe9dFV.js} +2 -2
- package/dist/{signals-ChFMD7mB.js.map → signals-Cnqe9dFV.js.map} +1 -1
- package/dist/{signals-SHg7J1U_.d.ts → signals-DBS60vTo.d.ts} +1 -1
- package/dist/{store-CM6pWVZh.js → store-ZwL2gN6a.js} +1 -1
- package/dist/{store-CM6pWVZh.js.map → store-ZwL2gN6a.js.map} +1 -1
- package/dist/{text-display-DRw3r_lK.d.ts → text-display-B_hpz50P.d.ts} +2 -2
- package/dist/{text-display-DbMumig_.js → text-display-BtQR88kY.js} +2 -2
- package/dist/text-display-BtQR88kY.js.map +1 -0
- package/dist/{type-checker-ocNSZh0W.js → type-checker-CEFHoQoV.js} +2 -2
- package/dist/{type-checker-ocNSZh0W.js.map → type-checker-CEFHoQoV.js.map} +1 -1
- package/dist/{types-package-BWArjyBF.js → types-package-D11rQXLs.js} +3 -4
- package/dist/{types-package-BWArjyBF.js.map → types-package-D11rQXLs.js.map} +1 -1
- package/dist/types.d.ts +32 -30
- package/dist/{utilities-DtdPlr4c.d.ts → utilities-CQUaua43.d.ts} +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/dev-hooks.d.ts +31 -29
- package/dist/utils/dev-hooks.js +37 -34
- package/dist/utils/error-codes.d.ts +1 -1
- package/dist/utils/resolve-file-url.d.ts +1 -1
- package/dist/utils/resolve-file-url.js +1 -1
- package/dist/utils/types-package.js +2 -2
- package/dist/utils/useful-stuff/async-queue.js +1 -2
- package/dist/utils/useful-stuff/async-queue.js.map +1 -1
- package/dist/utils/useful-stuff/ratelimiter.js +1 -2
- package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
- package/dist/utils/useful-stuff/semaphore.js +1 -3
- package/dist/utils/useful-stuff/semaphore.js.map +1 -1
- package/dist/utils/utilities.d.ts +1 -1
- package/dist/utils/utilities.js +37 -34
- package/dist/utils/{warn-unstable.d.ts → warning.d.ts} +12 -3
- package/dist/utils/warning.js +5 -0
- package/dist/{utils-DCSnVAZ6.js → utils-Bf-3Eevb.js} +1 -1
- package/dist/{utils-DCSnVAZ6.js.map → utils-Bf-3Eevb.js.map} +1 -1
- package/dist/{utils-KsNof0Xz.js → utils-Br3eenD1.js} +1 -1
- package/dist/{utils-KsNof0Xz.js.map → utils-Br3eenD1.js.map} +1 -1
- package/dist/{version-BCILNeQb.js → version-DC4j2ZwU.js} +2 -2
- package/dist/{version-BCILNeQb.js.map → version-DC4j2ZwU.js.map} +1 -1
- package/dist/{version-CtJtBJXI.d.ts → version-DggMfP_1.d.ts} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/warning-CszH8HeS.js +53 -0
- package/dist/warning-CszH8HeS.js.map +1 -0
- package/package.json +4 -4
- package/LICENSE +0 -5
- package/dist/ActionRow-CbdGFWMT.js.map +0 -1
- package/dist/EventWorkerContext-Dq29tieI.js.map +0 -1
- package/dist/app-process-cj2vF12T.js.map +0 -1
- package/dist/commandkit-lhbfAyX9.js.map +0 -1
- package/dist/common-vnMIelAE.js.map +0 -1
- package/dist/components/v1/action-row/ActionRow.d.ts +0 -6
- package/dist/components/v1/action-row/ActionRow.js +0 -3
- package/dist/components/v1/button/Button.d.ts +0 -7
- package/dist/components/v1/button/Button.js +0 -38
- package/dist/components/v1/button/ButtonKit.js +0 -38
- package/dist/components/v1/modal/Modal.js +0 -41
- package/dist/components/v1/modal/ModalKit.js +0 -38
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/RoleSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/SelectMenu.js +0 -43
- package/dist/components/v1/select-menu/StringSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/UserSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/common.js +0 -1
- package/dist/components/v2/common.js +0 -3
- package/dist/components/v2/container.d.ts +0 -2
- package/dist/components/v2/container.js +0 -4
- package/dist/components/v2/file.d.ts +0 -2
- package/dist/components/v2/file.js +0 -3
- package/dist/components/v2/index.d.ts +0 -8
- package/dist/components/v2/index.js +0 -17
- package/dist/components/v2/section.d.ts +0 -2
- package/dist/components/v2/section.js +0 -5
- package/dist/components/v2/separator.d.ts +0 -2
- package/dist/components/v2/separator.js +0 -3
- package/dist/components/v2/text-display.d.ts +0 -2
- package/dist/components/v2/text-display.js +0 -3
- package/dist/container-C6GtfAPW.js.map +0 -1
- package/dist/element-Bak9llw_.js.map +0 -1
- package/dist/feature-flags-DnnKABHf.js.map +0 -1
- package/dist/file-DVOELoNv.js.map +0 -1
- package/dist/media-gallery-zDtJ3kxb.js.map +0 -1
- package/dist/section-DlvrDoJK.js.map +0 -1
- package/dist/separator-DL6QH5H1.js.map +0 -1
- package/dist/text-display-DbMumig_.js.map +0 -1
- package/dist/utils/warn-unstable.js +0 -26
- package/dist/utils/warn-unstable.js.map +0 -1
- /package/dist/{ILogger-dQ7Y9X1f.js → ILogger-B0q7p7L1.js} +0 -0
- /package/dist/{app-HN1cVg8J.js → app-CrjK9yWX.js} +0 -0
- /package/dist/{common-CcfjYnPG.js → common-0Iw8ZeM6.js} +0 -0
- /package/dist/{router-Dn35v30f.js → display-WDb9wMCv.js} +0 -0
- /package/dist/{index-CUPkUUOR.d.ts → index-B5F3AfVc.d.ts} +0 -0
- /package/dist/{index-Dw5cCt-A.d.ts → index-BLwMeReG.d.ts} +0 -0
- /package/dist/{index-E7Wvm5uX.d.ts → index-h64gcVNJ.d.ts} +0 -0
- /package/dist/{runtime-DB9CiPfe.js → router-BvamdzoF.js} +0 -0
- /package/dist/{types-CUZOquUl.js → runtime-Skt5NiOc.js} +0 -0
- /package/dist/{types-q0Nm882H.js → types-Cdh4uaFR.js} +0 -0
- /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
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
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/
|
|
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
|
-
|
|
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/
|
|
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/
|
|
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/
|
|
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 =
|
|
407
|
-
|
|
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"
|
|
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)
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
4526
|
+
//# sourceMappingURL=commandkit-DabqpQ6v.js.map
|