commandkit 1.2.0-rc.11 → 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/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-XNgriym3.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-AaAl3kQM.d.ts → analytics-engine-NOInIjv8.d.ts} +28 -6
- 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-B5qTswWF.js → build-BYMHMOl_.js} +11 -12
- package/dist/{build-B5qTswWF.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-ZoBBh0Q_.js → commandkit-DabqpQ6v.js} +100 -58
- 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-D-JMp2IO.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-CKNrjgqg.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-_7_QDifv.js → init-CBb0StSB.js} +11 -15
- package/dist/{init-_7_QDifv.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 +31 -29
- 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--Q1nmlBz.js → version-DC4j2ZwU.js} +2 -2
- package/dist/{version--Q1nmlBz.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 +3 -3
- 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-ZoBBh0Q_.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-CKNrjgqg.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
package/dist/cli/production.js
CHANGED
|
@@ -1,45 +1,48 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-nOFOJqeH.js');
|
|
2
2
|
require('../colors-DL3ucTiT.js');
|
|
3
|
-
require('../ActionRow-
|
|
3
|
+
require('../ActionRow-uJxU4UGo.js');
|
|
4
4
|
require('../error-codes-Ds0bnPvT.js');
|
|
5
|
-
const require_commandkit = require('../commandkit-
|
|
6
|
-
require('../
|
|
7
|
-
require('../common-
|
|
8
|
-
require('../
|
|
9
|
-
require('../
|
|
10
|
-
require('../
|
|
11
|
-
require('../
|
|
12
|
-
require('../
|
|
13
|
-
require('../
|
|
14
|
-
require('../
|
|
15
|
-
require('../
|
|
16
|
-
require('../
|
|
17
|
-
require('../
|
|
18
|
-
|
|
19
|
-
require('../
|
|
20
|
-
|
|
21
|
-
require('../
|
|
22
|
-
require('../
|
|
23
|
-
require('../
|
|
24
|
-
require('../
|
|
25
|
-
require('../
|
|
26
|
-
require('../
|
|
27
|
-
require('../
|
|
28
|
-
require('../
|
|
29
|
-
require('../
|
|
30
|
-
require('../
|
|
31
|
-
require('../
|
|
32
|
-
require('../
|
|
33
|
-
require('../
|
|
34
|
-
require('../
|
|
35
|
-
|
|
36
|
-
require('../
|
|
37
|
-
require('../
|
|
38
|
-
require('../
|
|
39
|
-
|
|
40
|
-
require('../
|
|
41
|
-
|
|
42
|
-
const
|
|
5
|
+
const require_commandkit = require('../commandkit-DabqpQ6v.js');
|
|
6
|
+
require('../warning-CszH8HeS.js');
|
|
7
|
+
require('../common-0Iw8ZeM6.js');
|
|
8
|
+
require('../common-CCx-FJI4.js');
|
|
9
|
+
require('../container-DC0eQigs.js');
|
|
10
|
+
require('../file-DAUOZYhC.js');
|
|
11
|
+
require('../media-gallery-BLhwe5lO.js');
|
|
12
|
+
require('../section-BMcHN97i.js');
|
|
13
|
+
require('../separator-C___2K-f.js');
|
|
14
|
+
require('../text-display-BtQR88kY.js');
|
|
15
|
+
require('../label-D-uJWRZ0.js');
|
|
16
|
+
require('../poll-Bc6rjeUS.js');
|
|
17
|
+
require('../display-WDb9wMCv.js');
|
|
18
|
+
require('../element-DibzzA5L.js');
|
|
19
|
+
require('../types-TC4g3w91.js');
|
|
20
|
+
require('../EventInterceptor-BWoEJMHZ.js');
|
|
21
|
+
const require_constants = require('../constants-BMWH2YUr.js');
|
|
22
|
+
require('../PluginCommon-CPWV5xuX.js');
|
|
23
|
+
const require_CompilerPlugin = require('../CompilerPlugin-CZ4412Zm.js');
|
|
24
|
+
require('../RuntimePlugin-COeXe8rP.js');
|
|
25
|
+
require('../types-Cdh4uaFR.js');
|
|
26
|
+
require('../resolve-file-url-CJoD0FAn.js');
|
|
27
|
+
require('../runtime-Skt5NiOc.js');
|
|
28
|
+
require('../utils-Br3eenD1.js');
|
|
29
|
+
require('../types-package-D11rQXLs.js');
|
|
30
|
+
require('../constants-D0dawKxO.js');
|
|
31
|
+
require('../EventWorkerContext-D_9q1Bm2.js');
|
|
32
|
+
require('../signals-Cnqe9dFV.js');
|
|
33
|
+
require('../helpers-D2_1jih6.js');
|
|
34
|
+
require('../MessageCommandParser-CKh-tM97.js');
|
|
35
|
+
require('../CommandsRouter-CWMipIis.js');
|
|
36
|
+
require('../EventsRouter-C04XqRKf.js');
|
|
37
|
+
require('../router-BvamdzoF.js');
|
|
38
|
+
const require_common$2 = require('../common-fIO6fqGZ.js');
|
|
39
|
+
require('../CommandKitEventsChannel-2l9Za-le.js');
|
|
40
|
+
require('../store-ZwL2gN6a.js');
|
|
41
|
+
require('../env-8yY-6pbC.js');
|
|
42
|
+
const require_app_process = require('../app-process-AQ3Cbf6j.js');
|
|
43
|
+
require('../type-checker-CEFHoQoV.js');
|
|
44
|
+
const require_build = require('../build-BYMHMOl_.js');
|
|
45
|
+
const require_utils$1 = require('../utils-Bf-3Eevb.js');
|
|
43
46
|
let fs = require("fs");
|
|
44
47
|
fs = require_chunk.__toESM(fs);
|
|
45
48
|
|
|
@@ -51,8 +54,7 @@ fs = require_chunk.__toESM(fs);
|
|
|
51
54
|
async function bootstrapProductionServer(configPath) {
|
|
52
55
|
process.env.COMMANDKIT_BOOTSTRAP_MODE = "production";
|
|
53
56
|
const cwd = configPath || require_constants.COMMANDKIT_CWD;
|
|
54
|
-
const
|
|
55
|
-
const mainFile = require_common$2.findEntrypoint(config.distDir);
|
|
57
|
+
const mainFile = require_common$2.findEntrypoint((await require_commandkit.loadConfigFile(cwd)).distDir);
|
|
56
58
|
if (!(0, fs.existsSync)(mainFile)) require_common$2.panic(`Could not locate the entrypoint. Did you forget to build the application? Run 'commandkit build' to build the application first.`);
|
|
57
59
|
return require_app_process.createAppProcess(mainFile, cwd, false);
|
|
58
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production.js","names":[],"sources":["../../src/cli/production.ts"],"sourcesContent":["import { loadConfigFile } from '../config/loader';\nimport { createAppProcess } from './app-process';\nimport { existsSync } from 'fs';\nimport { findEntrypoint, panic } from './common';\nimport { buildApplication } from './build';\nimport { CompilerPlugin, isCompilerPlugin } from '../plugins';\nimport { createSpinner } from './utils';\nimport { COMMANDKIT_CWD } from '../utils/constants';\n\n/**\n * @private\n * @internal\n */\nexport async function bootstrapProductionServer(configPath?: string) {\n process.env.COMMANDKIT_BOOTSTRAP_MODE = 'production';\n const cwd = configPath || COMMANDKIT_CWD;\n const config = await loadConfigFile(cwd);\n const mainFile = findEntrypoint(config.distDir);\n\n if (!existsSync(mainFile)) {\n panic(\n `Could not locate the entrypoint. Did you forget to build the application? Run 'commandkit build' to build the application first.`,\n );\n }\n\n return createAppProcess(mainFile, cwd, false);\n}\n\n/**\n * @private\n * @internal\n */\nexport async function createProductionBuild(configPath?: string) {\n process.env.COMMANDKIT_BOOTSTRAP_MODE = 'production';\n const cwd = configPath || COMMANDKIT_CWD;\n const config = await loadConfigFile(cwd);\n\n const spinner = await createSpinner(\n 'Creating an optimized production build\\n',\n );\n\n spinner.start();\n\n await buildApplication({\n configPath: cwd,\n isDev: false,\n plugins: config.plugins.filter((p) =>\n isCompilerPlugin(p),\n ) as CompilerPlugin[],\n rolldownPlugins: config.rolldownPlugins,\n });\n\n spinner.succeed('Production build completed!');\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"production.js","names":[],"sources":["../../src/cli/production.ts"],"sourcesContent":["import { loadConfigFile } from '../config/loader';\nimport { createAppProcess } from './app-process';\nimport { existsSync } from 'fs';\nimport { findEntrypoint, panic } from './common';\nimport { buildApplication } from './build';\nimport { CompilerPlugin, isCompilerPlugin } from '../plugins';\nimport { createSpinner } from './utils';\nimport { COMMANDKIT_CWD } from '../utils/constants';\n\n/**\n * @private\n * @internal\n */\nexport async function bootstrapProductionServer(configPath?: string) {\n process.env.COMMANDKIT_BOOTSTRAP_MODE = 'production';\n const cwd = configPath || COMMANDKIT_CWD;\n const config = await loadConfigFile(cwd);\n const mainFile = findEntrypoint(config.distDir);\n\n if (!existsSync(mainFile)) {\n panic(\n `Could not locate the entrypoint. Did you forget to build the application? Run 'commandkit build' to build the application first.`,\n );\n }\n\n return createAppProcess(mainFile, cwd, false);\n}\n\n/**\n * @private\n * @internal\n */\nexport async function createProductionBuild(configPath?: string) {\n process.env.COMMANDKIT_BOOTSTRAP_MODE = 'production';\n const cwd = configPath || COMMANDKIT_CWD;\n const config = await loadConfigFile(cwd);\n\n const spinner = await createSpinner(\n 'Creating an optimized production build\\n',\n );\n\n spinner.start();\n\n await buildApplication({\n configPath: cwd,\n isDev: false,\n plugins: config.plugins.filter((p) =>\n isCompilerPlugin(p),\n ) as CompilerPlugin[],\n rolldownPlugins: config.rolldownPlugins,\n });\n\n spinner.succeed('Production build completed!');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,eAAsB,0BAA0B,YAAqB;AACnE,SAAQ,IAAI,4BAA4B;CACxC,MAAM,MAAM,cAAc;CAE1B,MAAM,WAAW,iCADF,MAAM,kCAAe,IAAI,EACD,QAAQ;AAE/C,KAAI,oBAAY,SAAS,CACvB,wBACE,mIACD;AAGH,QAAO,qCAAiB,UAAU,KAAK,MAAM;;;;;;AAO/C,eAAsB,sBAAsB,YAAqB;AAC/D,SAAQ,IAAI,4BAA4B;CACxC,MAAM,MAAM,cAAc;CAC1B,MAAM,SAAS,MAAM,kCAAe,IAAI;CAExC,MAAM,UAAU,MAAM,8BACpB,2CACD;AAED,SAAQ,OAAO;AAEf,OAAM,+BAAiB;EACrB,YAAY;EACZ,OAAO;EACP,SAAS,OAAO,QAAQ,QAAQ,MAChC,wCAAiB,EAAE,CAClB;EACD,iBAAiB,OAAO;EACzB,CAAC;AAEF,SAAQ,QAAQ,8BAA8B"}
|
package/dist/cli/type-checker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../colors-DL3ucTiT.js');
|
|
2
|
-
require('../constants-
|
|
3
|
-
require('../types-package-
|
|
4
|
-
require('../common-
|
|
5
|
-
const require_type_checker = require('../type-checker-
|
|
2
|
+
require('../constants-BMWH2YUr.js');
|
|
3
|
+
require('../types-package-D11rQXLs.js');
|
|
4
|
+
require('../common-fIO6fqGZ.js');
|
|
5
|
+
const require_type_checker = require('../type-checker-CEFHoQoV.js');
|
|
6
6
|
|
|
7
7
|
exports.performTypeCheck = require_type_checker.performTypeCheck;
|
package/dist/cli/utils.js
CHANGED
|
@@ -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.
|
|
@@ -2738,7 +2747,10 @@ var CommandRegistrar = class {
|
|
|
2738
2747
|
...json,
|
|
2739
2748
|
type: discord_js.ApplicationCommandType.ChatInput,
|
|
2740
2749
|
description: json.description ?? "No command description set.",
|
|
2741
|
-
__metadata
|
|
2750
|
+
__metadata,
|
|
2751
|
+
__applyId: (id) => {
|
|
2752
|
+
cmd.discordId = id;
|
|
2753
|
+
}
|
|
2742
2754
|
});
|
|
2743
2755
|
if (cmd.data.userContextMenu) {
|
|
2744
2756
|
var _metadata$nameAliases;
|
|
@@ -2749,7 +2761,10 @@ var CommandRegistrar = class {
|
|
|
2749
2761
|
options: void 0,
|
|
2750
2762
|
description_localizations: void 0,
|
|
2751
2763
|
description: void 0,
|
|
2752
|
-
__metadata
|
|
2764
|
+
__metadata,
|
|
2765
|
+
__applyId: (id) => {
|
|
2766
|
+
cmd.discordId = id;
|
|
2767
|
+
}
|
|
2753
2768
|
});
|
|
2754
2769
|
}
|
|
2755
2770
|
if (cmd.data.messageContextMenu) {
|
|
@@ -2761,7 +2776,10 @@ var CommandRegistrar = class {
|
|
|
2761
2776
|
description_localizations: void 0,
|
|
2762
2777
|
description: void 0,
|
|
2763
2778
|
options: void 0,
|
|
2764
|
-
__metadata
|
|
2779
|
+
__metadata,
|
|
2780
|
+
__applyId: (id) => {
|
|
2781
|
+
cmd.discordId = id;
|
|
2782
|
+
}
|
|
2765
2783
|
});
|
|
2766
2784
|
}
|
|
2767
2785
|
return collections;
|
|
@@ -2821,8 +2839,16 @@ var CommandRegistrar = class {
|
|
|
2821
2839
|
try {
|
|
2822
2840
|
const data = await this.api.put(discord_js.Routes.applicationCommands(this.commandkit.client.user.id), { body: commands.map((c) => ({
|
|
2823
2841
|
...c,
|
|
2824
|
-
__metadata: void 0
|
|
2842
|
+
__metadata: void 0,
|
|
2843
|
+
__applyId: void 0
|
|
2825
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
|
+
});
|
|
2826
2852
|
Logger.info(`✨ Refreshed ${data.length} global application (/) commands`);
|
|
2827
2853
|
} catch (e) {
|
|
2828
2854
|
Logger.error`Failed to update global application (/) commands: ${e}`;
|
|
@@ -2872,8 +2898,16 @@ var CommandRegistrar = class {
|
|
|
2872
2898
|
if (prevented$1) continue;
|
|
2873
2899
|
const data = await this.api.put(discord_js.Routes.applicationGuildCommands(this.commandkit.client.user.id, guild), { body: guildCommands.map((b) => ({
|
|
2874
2900
|
...b,
|
|
2875
|
-
__metadata: void 0
|
|
2901
|
+
__metadata: void 0,
|
|
2902
|
+
__applyId: void 0
|
|
2876
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
|
+
});
|
|
2877
2911
|
count += data.length;
|
|
2878
2912
|
}
|
|
2879
2913
|
Logger.info(`✨ Refreshed ${count} guild application (/) commands`);
|
|
@@ -3014,8 +3048,7 @@ var AppCommandHandler = class {
|
|
|
3014
3048
|
if (hasChildren) {
|
|
3015
3049
|
const children = categoryTree[category].sort();
|
|
3016
3050
|
children.forEach((childCategory, idx) => {
|
|
3017
|
-
|
|
3018
|
-
printCategory(childCategory, childIndent, childIsLast, childIndent);
|
|
3051
|
+
printCategory(childCategory, childIndent, idx === children.length - 1, childIndent);
|
|
3019
3052
|
});
|
|
3020
3053
|
}
|
|
3021
3054
|
};
|
|
@@ -3032,8 +3065,7 @@ var AppCommandHandler = class {
|
|
|
3032
3065
|
return true;
|
|
3033
3066
|
}).sort();
|
|
3034
3067
|
topLevelCategories.forEach((category, index) => {
|
|
3035
|
-
|
|
3036
|
-
printCategory(category, "", isLast);
|
|
3068
|
+
printCategory(category, "", index === topLevelCategories.length - 1);
|
|
3037
3069
|
});
|
|
3038
3070
|
}
|
|
3039
3071
|
/**
|
|
@@ -3158,6 +3190,15 @@ var AppCommandHandler = class {
|
|
|
3158
3190
|
}
|
|
3159
3191
|
return null;
|
|
3160
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
|
+
}
|
|
3161
3202
|
/**
|
|
3162
3203
|
* Reloads all commands and middleware from scratch.
|
|
3163
3204
|
*/
|
|
@@ -3219,8 +3260,7 @@ var AppCommandHandler = class {
|
|
|
3219
3260
|
if (require_constants.COMMANDKIT_IS_DEV) {
|
|
3220
3261
|
const commandNames = Array.from(this.loadedCommands.values()).map((v) => v.data.command.name);
|
|
3221
3262
|
const aliases = Array.from(this.loadedCommands.values()).flatMap((v) => v.metadata.aliases || []);
|
|
3222
|
-
|
|
3223
|
-
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(" | ")}`);
|
|
3224
3264
|
}
|
|
3225
3265
|
await this.commandkit.plugins.execute((ctx, plugin) => {
|
|
3226
3266
|
return plugin.onAfterCommandsLoad(ctx);
|
|
@@ -3255,6 +3295,7 @@ var AppCommandHandler = class {
|
|
|
3255
3295
|
try {
|
|
3256
3296
|
if (command.path === null) {
|
|
3257
3297
|
this.loadedCommands.set(id, {
|
|
3298
|
+
discordId: null,
|
|
3258
3299
|
command,
|
|
3259
3300
|
metadata: {
|
|
3260
3301
|
guilds: [],
|
|
@@ -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,
|
|
@@ -4481,4 +4523,4 @@ Object.defineProperty(exports, 'useStore', {
|
|
|
4481
4523
|
return useStore;
|
|
4482
4524
|
}
|
|
4483
4525
|
});
|
|
4484
|
-
//# sourceMappingURL=commandkit-
|
|
4526
|
+
//# sourceMappingURL=commandkit-DabqpQ6v.js.map
|