commandkit 1.2.0-rc.9 → 1.2.1-dev.20260310005506
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/LICENSE +19 -3
- package/README.md +45 -26
- package/bin/index.mjs +1 -1
- package/cli.d.ts +19 -0
- package/config.cjs +3 -0
- package/config.d.ts +1 -0
- package/dist/{ActionRow-DKnFVDME.d.ts → ActionRow-Bt9qi0Mb.d.ts} +4 -5
- package/dist/{Button-4ZUXdA56.d.ts → Button-DxJLcZIU.d.ts} +7 -8
- package/dist/{ButtonKit-C7r7RPNf.d.ts → ButtonKit-BfcyvWfj.d.ts} +4 -5
- package/dist/{ChannelSelectMenuKit-BrXvBYNH.d.ts → ChannelSelectMenuKit-DYkudikb.d.ts} +5 -6
- package/dist/{CommandsRouter-CoOA7hkf.d.ts → CommandsRouter-DiNoF0dq.d.ts} +2 -3
- package/dist/{EventInterceptor-x-R2qshQ.d.ts → EventInterceptor-D9JKMcfi.d.ts} +2 -2
- package/dist/{EventsRouter-BacqK6z3.d.ts → EventsRouter-EuuSu6NH.d.ts} +2 -2
- package/dist/{MentionableSelectMenuKit-CPTKqx-O.d.ts → MentionableSelectMenuKit-Mu4xqP6B.d.ts} +5 -6
- package/dist/{MessageCommandParser-ROLibZPX.d.ts → MessageCommandParser-DPCbHXCS.d.ts} +4 -5
- package/dist/{Modal-C6UTRdYQ.d.ts → Modal-v9rrcMl-.d.ts} +25 -12
- package/dist/{ModalKit-Btz58KYn.d.ts → ModalKit-XJSM65SV.d.ts} +4 -5
- package/dist/{RoleSelectMenuKit-C26lU3sN.d.ts → RoleSelectMenuKit-CCjcp3HY.d.ts} +5 -6
- package/dist/{SelectMenu-Diy87_ba.d.ts → SelectMenu-CY0vvoSu.d.ts} +17 -14
- package/dist/{StringSelectMenuKit-Bhs8U6WI.d.ts → StringSelectMenuKit-G5nBTicX.d.ts} +5 -6
- package/dist/{UserSelectMenuKit-CfqFJdxz.d.ts → UserSelectMenuKit-D3SO_fXA.d.ts} +5 -6
- package/dist/analytics/analytics-engine.d.ts +1 -31
- package/dist/analytics/analytics-engine.js +2 -36
- package/dist/analytics/analytics-provider.d.ts +1 -31
- package/dist/analytics/analytics-provider.js +1 -0
- package/dist/analytics/constants.js +26 -3
- package/dist/analytics/constants.js.map +1 -0
- package/dist/analytics/utils.js +2 -36
- package/dist/{analytics-engine-B7JNRnEN.d.ts → analytics-engine-DnRsHBId.d.ts} +48 -34
- package/dist/app/commands/AppCommandRunner.d.ts +1 -31
- package/dist/app/commands/AppCommandRunner.js +2 -36
- package/dist/app/commands/Context.d.ts +1 -31
- package/dist/app/commands/Context.js +2 -36
- package/dist/app/commands/MessageCommandParser.d.ts +1 -1
- package/dist/app/commands/MessageCommandParser.js +261 -4
- package/dist/app/commands/MessageCommandParser.js.map +1 -0
- package/dist/app/commands/helpers.d.ts +1 -1
- package/dist/app/commands/helpers.js +25 -3
- package/dist/app/commands/helpers.js.map +1 -0
- package/dist/app/events/EventWorkerContext.d.ts +42 -33
- package/dist/app/events/EventWorkerContext.js +48 -5
- package/dist/app/events/EventWorkerContext.js.map +1 -0
- package/dist/app/handlers/AppCommandHandler.d.ts +1 -31
- package/dist/app/handlers/AppCommandHandler.js +2 -36
- package/dist/app/handlers/AppEventsHandler.d.ts +1 -31
- package/dist/app/handlers/AppEventsHandler.js +2 -36
- package/dist/app/index.d.ts +4 -31
- package/dist/app/index.js +13 -45
- package/dist/app/interrupt/signals.d.ts +1 -1
- package/dist/app/interrupt/signals.js +54 -7
- package/dist/app/interrupt/signals.js.map +1 -0
- package/dist/app/middlewares/permissions.d.ts +1 -31
- package/dist/app/middlewares/permissions.js +2 -36
- package/dist/app/register/CommandRegistrar.d.ts +1 -31
- package/dist/app/register/CommandRegistrar.js +2 -36
- package/dist/app/router/CommandsRouter.d.ts +1 -1
- package/dist/app/router/CommandsRouter.js +210 -2
- package/dist/app/router/CommandsRouter.js.map +1 -0
- package/dist/app/router/EventsRouter.d.ts +1 -1
- package/dist/app/router/EventsRouter.js +128 -2
- package/dist/app/router/EventsRouter.js.map +1 -0
- package/dist/app/router/index.d.ts +2 -3
- package/dist/app/router/index.js +5 -5
- package/dist/{chunk-nOFOJqeH.js → chunk-BE-pF4vm.js} +11 -7
- package/dist/cli/app-process.d.ts +2 -3
- package/dist/cli/app-process.js +60 -7
- package/dist/cli/app-process.js.map +1 -0
- package/dist/cli/build.d.ts +2 -31
- package/dist/cli/build.js +171 -41
- package/dist/cli/build.js.map +1 -0
- package/dist/cli/common.d.ts +10 -34
- package/dist/cli/common.js +182 -11
- package/dist/cli/common.js.map +1 -0
- package/dist/cli/development.d.ts +18 -1
- package/dist/cli/development.js +52 -78
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/env.d.ts +4 -0
- package/dist/cli/env.js +73 -9
- package/dist/cli/env.js.map +1 -0
- package/dist/cli/generators.js +10 -13
- package/dist/cli/generators.js.map +1 -1
- package/dist/cli/information.js +11 -10
- package/dist/cli/information.js.map +1 -1
- package/dist/cli/init.d.ts +12 -2
- package/dist/cli/init.js +83 -38
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/production.d.ts +2 -3
- package/dist/cli/production.js +19 -52
- package/dist/cli/production.js.map +1 -1
- package/dist/cli/type-checker.js +83 -6
- package/dist/cli/type-checker.js.map +1 -0
- package/dist/cli/utils.d.ts +0 -1
- package/dist/cli/utils.js +18 -2
- package/dist/cli/utils.js.map +1 -0
- package/dist/{commandkit-Bm0gLN8i.js → commandkit-Bh7C1_c7.js} +3219 -2616
- package/dist/commandkit-Bh7C1_c7.js.map +1 -0
- package/dist/commandkit.d.ts +1 -31
- package/dist/commandkit.js +2 -36
- package/dist/{common-DOCvOVC4.d.ts → common-CCvvgnxi.d.ts} +4 -5
- package/dist/components/common/EventInterceptor.d.ts +1 -1
- package/dist/components/common/EventInterceptor.js +137 -2
- package/dist/components/common/EventInterceptor.js.map +1 -0
- package/dist/components/common/element.d.ts +2 -5
- package/dist/components/common/element.js +10 -8
- package/dist/components/common/types.d.ts +1 -1
- package/dist/components/common/types.js +1 -1
- package/dist/components/{v2 → display}/common.d.ts +1 -2
- package/dist/components/display/common.js +4 -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/{file-DVOELoNv.js → components/display/file.js} +5 -10
- package/dist/components/display/file.js.map +1 -0
- package/dist/components/display/index.d.ts +9 -0
- package/dist/components/display/index.js +19 -0
- package/dist/components/display/label.d.ts +2 -0
- package/dist/components/display/label.js +4 -0
- package/dist/components/display/media-gallery.d.ts +2 -0
- package/dist/components/display/media-gallery.js +5 -0
- package/dist/components/display/poll.d.ts +2 -0
- package/dist/components/display/poll.js +86 -0
- package/dist/components/display/poll.js.map +1 -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/{separator-DL6QH5H1.js → components/display/separator.js} +5 -10
- package/dist/components/display/separator.js.map +1 -0
- package/dist/components/display/text-display.d.ts +2 -0
- package/dist/{text-display-DbMumig_.js → components/display/text-display.js} +5 -10
- package/dist/components/display/text-display.js.map +1 -0
- package/dist/components/index.d.ts +23 -24
- package/dist/components/index.js +29 -53
- package/dist/components/interactive/action-row/ActionRow.d.ts +2 -0
- package/dist/{ActionRow-CbdGFWMT.js → components/interactive/action-row/ActionRow.js} +5 -10
- package/dist/components/interactive/action-row/ActionRow.js.map +1 -0
- package/dist/components/interactive/button/Button.d.ts +2 -0
- package/dist/components/interactive/button/Button.js +4 -0
- package/dist/components/interactive/button/ButtonKit.d.ts +2 -0
- package/dist/components/interactive/button/ButtonKit.js +4 -0
- package/dist/components/interactive/modal/Modal.d.ts +2 -0
- package/dist/components/interactive/modal/Modal.js +8 -0
- package/dist/components/interactive/modal/ModalKit.d.ts +2 -0
- package/dist/components/interactive/modal/ModalKit.js +4 -0
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +2 -0
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +4 -0
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +2 -0
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +4 -0
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +2 -0
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +4 -0
- package/dist/components/interactive/select-menu/SelectMenu.d.ts +2 -0
- package/dist/components/interactive/select-menu/SelectMenu.js +9 -0
- package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +2 -0
- package/dist/components/interactive/select-menu/StringSelectMenuKit.js +4 -0
- package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +2 -0
- package/dist/components/interactive/select-menu/UserSelectMenuKit.js +4 -0
- package/dist/components/interactive/select-menu/common.d.ts +2 -0
- package/dist/components/interactive/select-menu/common.js +1 -0
- package/dist/config/config.d.ts +15 -33
- package/dist/config/config.js +2 -36
- package/dist/config/default.d.ts +1 -31
- package/dist/config/default.js +2 -36
- package/dist/config/loader.d.ts +1 -31
- package/dist/config/loader.js +2 -36
- package/dist/config/types.d.ts +1 -31
- package/dist/config/types.js +1 -0
- package/dist/config/utils.d.ts +1 -31
- package/dist/config/utils.js +29 -2
- package/dist/config/utils.js.map +1 -0
- package/dist/{constants-D8PMA9on.d.ts → constants-DqtJY0t-.d.ts} +3 -3
- package/dist/{constants-MKu-Q1jh.d.ts → constants-DwxpkIeH.d.ts} +8 -2
- package/dist/{container-DHBELeJ3.d.ts → container-CYojOA9d.d.ts} +3 -4
- package/dist/context/async-context.d.ts +1 -31
- package/dist/context/async-context.js +2 -36
- package/dist/context/environment.d.ts +1 -31
- package/dist/context/environment.js +2 -36
- package/dist/{element-CAXu1XtK.d.ts → element-DeLvTMfZ.d.ts} +5 -5
- package/dist/events/CommandKitEventsChannel.d.ts +1 -31
- package/dist/events/CommandKitEventsChannel.js +83 -2
- package/dist/events/CommandKitEventsChannel.js.map +1 -0
- package/dist/{file-DTrr-p09.d.ts → file-DLO1zEcH.d.ts} +3 -4
- package/dist/flags/FlagProvider.d.ts +1 -31
- package/dist/flags/FlagProvider.js +1 -0
- package/dist/flags/FlagProvider.js.map +1 -1
- package/dist/flags/feature-flags.d.ts +1 -31
- package/dist/flags/feature-flags.js +5 -40
- package/dist/flags/store.d.ts +1 -31
- package/dist/flags/store.js +13 -2
- package/dist/flags/store.js.map +1 -0
- package/dist/{helpers-Wg6P5fRQ.d.ts → helpers-zmC44Mcu.d.ts} +2 -3
- package/dist/index-BIsCUWAs.d.ts +1 -0
- package/dist/index-CwHYpK-f.d.ts +1 -0
- package/dist/index-DHrsNvX1.d.ts +1 -0
- package/dist/index.d.ts +41 -42
- package/dist/index.js +80 -98
- package/dist/kv/constants.d.ts +1 -1
- package/dist/kv/constants.js +22 -2
- package/dist/kv/constants.js.map +1 -0
- package/dist/kv/dotprops.js +26 -3
- package/dist/kv/dotprops.js.map +1 -0
- package/dist/kv/kv.d.ts +1 -2
- package/dist/kv/kv.js +15 -18
- package/dist/kv/kv.js.map +1 -1
- package/dist/kv/serde.d.ts +12 -3
- package/dist/kv/serde.js +87 -4
- package/dist/kv/serde.js.map +1 -0
- package/dist/label-DqGRqodo.d.ts +28 -0
- package/dist/logger/DefaultLogger.d.ts +66 -3
- package/dist/logger/DefaultLogger.js +2 -36
- package/dist/logger/ILogger.d.ts +64 -2
- package/dist/logger/ILogger.js +1 -1
- package/dist/logger/Logger.d.ts +36 -3
- package/dist/logger/Logger.js +2 -36
- package/dist/logger/NoopLogger.d.ts +1 -2
- package/dist/logger/NoopLogger.js +1 -0
- package/dist/logger/NoopLogger.js.map +1 -1
- package/dist/{media-gallery-BMsXSot3.d.ts → media-gallery-Ca8es-eB.d.ts} +3 -4
- package/dist/plugins/CompilerPlugin.d.ts +1 -31
- package/dist/plugins/CompilerPlugin.js +33 -4
- package/dist/plugins/CompilerPlugin.js.map +1 -0
- package/dist/plugins/PluginCommon.d.ts +1 -31
- package/dist/plugins/PluginCommon.js +55 -4
- package/dist/plugins/PluginCommon.js.map +1 -0
- package/dist/plugins/RuntimePlugin.d.ts +1 -31
- package/dist/plugins/RuntimePlugin.js +124 -4
- package/dist/plugins/RuntimePlugin.js.map +1 -0
- package/dist/plugins/index.d.ts +1 -31
- package/dist/plugins/index.js +8 -40
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -31
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +2 -36
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -31
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +2 -36
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -31
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +2 -36
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -31
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +2 -36
- package/dist/plugins/plugin-runtime/runtime.d.ts +1 -31
- package/dist/plugins/plugin-runtime/runtime.js +1 -1
- package/dist/plugins/types.d.ts +1 -31
- package/dist/plugins/types.js +1 -1
- package/dist/poll-DQ6DX_Tt.d.ts +88 -0
- package/dist/{section-Dh_FhPeC.d.ts → section-Q8nwx_-q.d.ts} +3 -4
- package/dist/{separator-CMf6Cyy5.d.ts → separator-B8P-kdIK.d.ts} +3 -4
- package/dist/{signals-SHg7J1U_.d.ts → signals-CBXwugBW.d.ts} +2 -2
- package/dist/{text-display-DRw3r_lK.d.ts → text-display-CL9C2yMc.d.ts} +3 -4
- package/dist/{types-CJ-XvOFN.d.ts → types-DZy7U-Ld.d.ts} +2 -2
- package/dist/types.d.ts +2 -32
- package/dist/types.js +1 -0
- package/dist/utils/colors.js +9 -3
- package/dist/utils/colors.js.map +1 -0
- package/dist/utils/constants.d.ts +2 -2
- package/dist/utils/constants.js +50 -7
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/dev-hooks.d.ts +1 -31
- package/dist/utils/dev-hooks.js +2 -36
- package/dist/utils/error-codes.d.ts +54 -2
- package/dist/utils/error-codes.js +53 -5
- package/dist/utils/error-codes.js.map +1 -0
- package/dist/utils/resolve-file-url.d.ts +11 -2
- package/dist/utils/resolve-file-url.js +18 -2
- package/dist/utils/resolve-file-url.js.map +1 -0
- package/dist/utils/types-package.js +61 -4
- package/dist/utils/types-package.js.map +1 -0
- package/dist/utils/useful-stuff/async-queue.js +2 -2
- package/dist/utils/useful-stuff/async-queue.js.map +1 -1
- package/dist/utils/useful-stuff/mutex.js +1 -0
- package/dist/utils/useful-stuff/mutex.js.map +1 -1
- package/dist/utils/useful-stuff/ratelimiter.js +2 -2
- package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
- package/dist/utils/useful-stuff/semaphore.js +2 -3
- package/dist/utils/useful-stuff/semaphore.js.map +1 -1
- package/dist/utils/utilities.d.ts +113 -2
- package/dist/utils/utilities.js +5 -37
- package/dist/utils/{warn-unstable.d.ts → warning.d.ts} +12 -3
- package/dist/utils/{warn-unstable.js → warning.js} +15 -2
- package/dist/utils/warning.js.map +1 -0
- package/dist/version.d.ts +8 -2
- package/dist/version.js +13 -2
- package/dist/version.js.map +1 -0
- package/hooks.cjs +11 -4
- package/package.json +22 -18
- package/ratelimit.cjs +0 -1
- package/dist/ActionRow-CbdGFWMT.js.map +0 -1
- package/dist/CommandKitEventsChannel-BtRzr3Tz.js +0 -88
- package/dist/CommandKitEventsChannel-BtRzr3Tz.js.map +0 -1
- package/dist/CommandsRouter-Cgcy6cK9.js +0 -220
- package/dist/CommandsRouter-Cgcy6cK9.js.map +0 -1
- package/dist/CompilerPlugin-M8r3yNAl.js +0 -43
- package/dist/CompilerPlugin-M8r3yNAl.js.map +0 -1
- package/dist/DefaultLogger-XCOl5nLd.d.ts +0 -67
- package/dist/EventInterceptor-CQEXyUTp.js +0 -142
- package/dist/EventInterceptor-CQEXyUTp.js.map +0 -1
- package/dist/EventWorkerContext-BMk7IXpC.d.ts +0 -43
- package/dist/EventWorkerContext-Dq29tieI.js +0 -69
- package/dist/EventWorkerContext-Dq29tieI.js.map +0 -1
- package/dist/EventsRouter-3Gygh-km.js +0 -137
- package/dist/EventsRouter-3Gygh-km.js.map +0 -1
- package/dist/ILogger-BW8GM-YZ.d.ts +0 -64
- package/dist/ILogger-dQ7Y9X1f.js +0 -0
- package/dist/Logger-DyfkPk7u.d.ts +0 -37
- package/dist/MessageCommandParser-CEuO6Ex3.js +0 -269
- package/dist/MessageCommandParser-CEuO6Ex3.js.map +0 -1
- package/dist/PluginCommon-Cvl5yYM_.js +0 -71
- package/dist/PluginCommon-Cvl5yYM_.js.map +0 -1
- package/dist/RuntimePlugin-BUecuBIU.js +0 -134
- package/dist/RuntimePlugin-BUecuBIU.js.map +0 -1
- package/dist/app-HN1cVg8J.js +0 -0
- package/dist/app-process-DoG6Spkf.js +0 -68
- package/dist/app-process-DoG6Spkf.js.map +0 -1
- package/dist/build-C9ltqPmn.js +0 -175
- package/dist/build-C9ltqPmn.js.map +0 -1
- package/dist/colors-DL3ucTiT.js +0 -15
- package/dist/colors-DL3ucTiT.js.map +0 -1
- package/dist/commandkit-Bm0gLN8i.js.map +0 -1
- package/dist/common-CcfjYnPG.js +0 -0
- package/dist/common-Dxr9-XPa.js +0 -211
- package/dist/common-Dxr9-XPa.js.map +0 -1
- package/dist/common-vnMIelAE.js +0 -17
- 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.d.ts +0 -3
- package/dist/components/v1/button/ButtonKit.js +0 -38
- package/dist/components/v1/modal/Modal.d.ts +0 -7
- package/dist/components/v1/modal/Modal.js +0 -41
- package/dist/components/v1/modal/ModalKit.d.ts +0 -3
- package/dist/components/v1/modal/ModalKit.js +0 -38
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.d.ts +0 -4
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.d.ts +0 -4
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/RoleSelectMenuKit.d.ts +0 -4
- package/dist/components/v1/select-menu/RoleSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/SelectMenu.d.ts +0 -10
- package/dist/components/v1/select-menu/SelectMenu.js +0 -43
- package/dist/components/v1/select-menu/StringSelectMenuKit.d.ts +0 -4
- package/dist/components/v1/select-menu/StringSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/UserSelectMenuKit.d.ts +0 -4
- package/dist/components/v1/select-menu/UserSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/common.d.ts +0 -3
- 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/media-gallery.d.ts +0 -2
- package/dist/components/v2/media-gallery.js +0 -5
- 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/config-BhVxyjmZ.d.ts +0 -16
- package/dist/constants-4oxxvaJA.js +0 -27
- package/dist/constants-4oxxvaJA.js.map +0 -1
- package/dist/constants-B5_Ta7PR.js +0 -70
- package/dist/constants-B5_Ta7PR.js.map +0 -1
- package/dist/constants-BOOGN85p.js +0 -37
- package/dist/constants-BOOGN85p.js.map +0 -1
- package/dist/container-C6GtfAPW.js +0 -44
- package/dist/container-C6GtfAPW.js.map +0 -1
- package/dist/dotprops-tnhpnszJ.js +0 -36
- package/dist/dotprops-tnhpnszJ.js.map +0 -1
- package/dist/element-Bak9llw_.js +0 -84
- package/dist/element-Bak9llw_.js.map +0 -1
- package/dist/env-_68PRRoA.js +0 -109
- package/dist/env-_68PRRoA.js.map +0 -1
- package/dist/error-codes-B4TyW4Ct.d.ts +0 -54
- package/dist/error-codes-Ds0bnPvT.js +0 -73
- package/dist/error-codes-Ds0bnPvT.js.map +0 -1
- package/dist/feature-flags-nZJB7-e5.js +0 -160
- package/dist/feature-flags-nZJB7-e5.js.map +0 -1
- package/dist/file-DVOELoNv.js.map +0 -1
- package/dist/helpers-BSwwrKJW.js +0 -36
- package/dist/helpers-BSwwrKJW.js.map +0 -1
- package/dist/index-DKcmsWXw.d.ts +0 -1
- package/dist/index-DSBMRX9A.d.ts +0 -1
- package/dist/index-DdqikUQD.d.ts +0 -1
- package/dist/index.js.map +0 -1
- package/dist/init-Cy_bcUt4.js +0 -95
- package/dist/init-Cy_bcUt4.js.map +0 -1
- package/dist/init-DOr-Y3GQ.d.ts +0 -13
- package/dist/media-gallery-zDtJ3kxb.js +0 -62
- package/dist/media-gallery-zDtJ3kxb.js.map +0 -1
- package/dist/resolve-file-url-ChIyw-Vf.js +0 -23
- package/dist/resolve-file-url-ChIyw-Vf.js.map +0 -1
- package/dist/resolve-file-url-yO8bUxok.d.ts +0 -11
- package/dist/router-Dn35v30f.js +0 -0
- package/dist/runtime-DB9CiPfe.js +0 -0
- package/dist/section-DlvrDoJK.js +0 -60
- package/dist/section-DlvrDoJK.js.map +0 -1
- package/dist/separator-DL6QH5H1.js.map +0 -1
- package/dist/serde-BYaKrsOV.d.ts +0 -12
- package/dist/serde-Cc8iUa9J.js +0 -97
- package/dist/serde-Cc8iUa9J.js.map +0 -1
- package/dist/signals-ChFMD7mB.js +0 -74
- package/dist/signals-ChFMD7mB.js.map +0 -1
- package/dist/store-CM6pWVZh.js +0 -19
- package/dist/store-CM6pWVZh.js.map +0 -1
- package/dist/text-display-DbMumig_.js.map +0 -1
- package/dist/type-checker-DR7RZFs5.js +0 -90
- package/dist/type-checker-DR7RZFs5.js.map +0 -1
- package/dist/types-CUZOquUl.js +0 -0
- package/dist/types-package-BWArjyBF.js +0 -75
- package/dist/types-package-BWArjyBF.js.map +0 -1
- package/dist/types-q0Nm882H.js +0 -0
- package/dist/utilities-DtdPlr4c.d.ts +0 -87
- package/dist/utils/warn-unstable.js.map +0 -1
- package/dist/utils-DCSnVAZ6.js +0 -23
- package/dist/utils-DCSnVAZ6.js.map +0 -1
- package/dist/utils-KsNof0Xz.js +0 -34
- package/dist/utils-KsNof0Xz.js.map +0 -1
- package/dist/v2-DofkPKHs.js +0 -0
- package/dist/version-CtJtBJXI.d.ts +0 -8
- package/dist/version-DRSQMx0w.js +0 -18
- package/dist/version-DRSQMx0w.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Copyright (c) Neplex
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,49 +1,68 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/
|
|
2
|
+
<img src="https://raw.githubusercontent.com/neplextech/commandkit/main/apps/website/static/img/ckit_logo.svg" width="75%" />
|
|
3
3
|
<br />
|
|
4
|
-
<a href="https://
|
|
4
|
+
<a href="https://commandkit.dev/discord"><img src="https://img.shields.io/discord/1055188344188973066?color=5865F2&logo=discord&logoColor=white" alt="support server" /></a>
|
|
5
5
|
<a href="https://www.npmjs.com/package/commandkit"><img src="https://img.shields.io/npm/v/commandkit?maxAge=3600" alt="npm version" /></a>
|
|
6
6
|
<a href="https://www.npmjs.com/package/commandkit"><img src="https://img.shields.io/npm/dt/commandkit?maxAge=3600" alt="npm downloads" /></a>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
-
<p align="center">
|
|
9
|
+
<p align="center">Stop rebuilding command and event handlers for every new discord.js bot. CommandKit does it for you — and a lot more.</p>
|
|
10
|
+
|
|
11
|
+
## Why CommandKit?
|
|
12
|
+
|
|
13
|
+
Every new discord.js project starts the same way: write a command handler, write an event handler, set up interaction collectors, register slash commands with the API, figure out a project structure. It's hours of boilerplate before you write any real bot logic.
|
|
14
|
+
|
|
15
|
+
Most existing discord.js frameworks solve this by giving you a handler class you instantiate and point at a folder — and that's about it. They're loaders, not frameworks. Others like Sapphire go further and have decent features, but require heavy OOP boilerplate where everything is a class extending a base class.
|
|
16
|
+
|
|
17
|
+
CommandKit takes a different approach entirely. It works like a proper meta-framework — think **Next.js for Discord bots**. It ships with a smart CLI that handles bundling, TypeScript/JSX compilation, hot-reloading, command registration, and project scaffolding automatically. You run `commandkit dev` and everything just works — zero configuration.
|
|
18
|
+
|
|
19
|
+
The design philosophy is **convention over configuration**: put a file in `src/app/commands/` and it's a command. Put a file in `src/app/events/` and it's an event listener. Export a `chatInput` function and it handles slash commands. Export a `message` function in the same file and it handles prefix commands too. No registration calls, no base classes, no decorators. The framework knows what to do with your code based on where it is and what it exports — so you skip the setup and go straight to building.
|
|
10
20
|
|
|
11
21
|
## Features
|
|
12
22
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- Slash + context menu commands + prefix commands support ✅
|
|
16
|
-
- Automatic command registration and updates 🤖
|
|
17
|
-
- Command middlewares for easy command management 🛠️
|
|
18
|
-
- Localization support through `@commandkit/i18n` plugin 🌍
|
|
19
|
-
- Plugin system to extend functionality 🔌
|
|
20
|
-
- Built-in command line interface for easy development 🖥️
|
|
21
|
-
- Out-of-the-box support for TypeScript and JavaScript 📜
|
|
22
|
-
- Built-in customizable cache system for speedy data storage and retrieval 🗄️
|
|
23
|
-
- User installable/guild scoped commands 🔧
|
|
24
|
-
- Custom events support 🔔
|
|
25
|
-
- JSX support for declaring Discord interaction components and modals 🎨
|
|
26
|
-
- Easy to use interaction components and modals system (forget about collectors) 🧩
|
|
27
|
-
- Less boilerplate code, more productivity 💪
|
|
28
|
-
- and much more...
|
|
23
|
+
### Automatic command and event handling
|
|
24
|
+
Drop your command files in a folder, export a function, and they just work. Slash commands, context menu commands, and prefix commands are all supported under a single unified command structure — no separate handler for each type. Commands are automatically registered and kept in sync with Discord. Events work the same way: create a file, export a listener, and CommandKit handles the rest.
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
### JSX components for Discord UI
|
|
27
|
+
discord.js builder chains (`ActionRowBuilder` → `ButtonBuilder` → `setCustomId` → ...) get messy fast. CommandKit lets you write Discord components in JSX — the same declarative syntax used in React — so your UI code is clean and readable.
|
|
28
|
+
|
|
29
|
+
### Built-in component handlers (no more collectors)
|
|
30
|
+
Buttons get `onClick`. Modals get `onSubmit`. Select menus get `onSelect`. Define a component and its behavior in one place — no `InteractionCollector` setup, no timeout management, no cleanup boilerplate.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
### Command middlewares
|
|
33
|
+
Run logic before or after any command executes — permission checks, cooldowns, logging, analytics — without touching the command itself. A proper middleware layer, like you'd find in Express.
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
### Unified prefix commands
|
|
36
|
+
Message-based (prefix) commands live in the same file as your slash commands and context menus. One command file handles all input types. No separate handler needed.
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
### Caching with Redis support
|
|
39
|
+
The `@commandkit/cache` plugin gives you a customizable caching layer — in-memory by default, Redis-backed when you need persistence. Just add the `'use cache'` directive to any function.
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
### Plugin system with custom events
|
|
42
|
+
Extend CommandKit through plugins that hook into the framework lifecycle. Plugins can emit custom events — for example, listening to an external webhook and firing events your bot can react to. This isn't a wrapper around `node:events`; it's a structured extension system for building modular, decoupled bot features. Official plugins include `@commandkit/i18n` for localization and `@commandkit/analytics` for usage tracking.
|
|
39
43
|
|
|
44
|
+
### AI-powered command execution
|
|
45
|
+
The `@commandkit/ai` plugin lets users interact with your bot through natural language. Instead of memorizing slash command names, users just talk to your bot — and the AI figures out which command to run. Built on the [AI SDK](https://ai-sdk.dev) with support for Google Gemini, OpenAI, and more. Includes built-in tools, custom tool support, lifecycle hooks, and per-user model selection.
|
|
46
|
+
|
|
47
|
+
### Zero-config TypeScript and JavaScript
|
|
48
|
+
Native TypeScript and JSX support with no configuration. No `tsconfig.json` fiddling, no separate build step, no bundler setup. The CLI handles compilation, bundling, hot-reloading, and project scaffolding.
|
|
49
|
+
|
|
50
|
+
## Who is this for?
|
|
51
|
+
|
|
52
|
+
- **Beginners** who don't want to spend hours building handlers before they can do anything useful
|
|
53
|
+
- **Experienced developers** tired of rebuilding the same boilerplate for every new bot project
|
|
54
|
+
- **Teams and freelancers** who need a reliable, structured foundation they can build on quickly
|
|
55
|
+
|
|
56
|
+
CommandKit has been used in production client projects and has saved hours of setup time on each one. It's not overhead — it's the setup work you'd do anyway, already done well.
|
|
57
|
+
|
|
58
|
+
## Getting Started
|
|
40
59
|
|
|
41
60
|
```bash
|
|
42
61
|
npm create commandkit
|
|
43
62
|
```
|
|
44
63
|
|
|
45
|
-
|
|
64
|
+
Follow the prompts, then run `commandkit dev` to start your bot. Check out the [documentation](https://commandkit.dev) for guides and API reference.
|
|
46
65
|
|
|
47
66
|
## Support and Suggestions
|
|
48
67
|
|
|
49
|
-
Submit any queries or suggestions in our [Discord community](https://
|
|
68
|
+
Submit any queries or suggestions in our [Discord community](https://commandkit.dev/discord).
|
package/bin/index.mjs
CHANGED
package/cli.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as development from './dist/cli/development.js';
|
|
2
|
+
import * as production from './dist/cli/production.js';
|
|
3
|
+
import * as env from './dist/cli/env.js';
|
|
4
|
+
import * as cli from './dist/cli/init.js';
|
|
5
|
+
import * as compiler from './dist/cli/build.js';
|
|
6
|
+
import * as appProcess from './dist/cli/app-process.js';
|
|
7
|
+
import * as typeChecker from './dist/cli/type-checker.js';
|
|
8
|
+
import * as utilities from './dist/cli/common.js';
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
development,
|
|
12
|
+
production,
|
|
13
|
+
env,
|
|
14
|
+
cli,
|
|
15
|
+
compiler,
|
|
16
|
+
appProcess,
|
|
17
|
+
typeChecker,
|
|
18
|
+
utilities,
|
|
19
|
+
};
|
package/config.cjs
CHANGED
package/config.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/components/v1/action-row/ActionRow.d.ts
|
|
1
|
+
import { n as CommandKitElement, t as AnyCommandKitElement } from "./element-DeLvTMfZ.js";
|
|
4
2
|
|
|
3
|
+
//#region src/components/interactive/action-row/ActionRow.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* The properties for the action row component.
|
|
7
6
|
*/
|
|
@@ -16,5 +15,5 @@ interface ActionRowProps {
|
|
|
16
15
|
*/
|
|
17
16
|
declare function ActionRow(props: ActionRowProps): CommandKitElement<'action-row'>;
|
|
18
17
|
//#endregion
|
|
19
|
-
export {
|
|
20
|
-
//# sourceMappingURL=ActionRow-
|
|
18
|
+
export { ActionRowProps as n, ActionRow as t };
|
|
19
|
+
//# sourceMappingURL=ActionRow-Bt9qi0Mb.d.ts.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-
|
|
2
|
-
import {
|
|
3
|
-
import { CommandKitElement } from "./element-
|
|
4
|
-
import { MaybeArray } from "./types-
|
|
1
|
+
import { r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
|
|
2
|
+
import { a as CommandKitButtonBuilderOnEnd, i as CommandKitButtonBuilderInteractionCollectorDispatchContextData, r as CommandKitButtonBuilderInteractionCollectorDispatch } from "./ButtonKit-BfcyvWfj.js";
|
|
3
|
+
import { n as CommandKitElement } from "./element-DeLvTMfZ.js";
|
|
4
|
+
import { t as MaybeArray } from "./types-DZy7U-Ld.js";
|
|
5
5
|
import { ButtonStyle, ComponentEmojiResolvable } from "discord.js";
|
|
6
6
|
|
|
7
|
-
//#region src/components/
|
|
8
|
-
|
|
7
|
+
//#region src/components/interactive/button/Button.d.ts
|
|
9
8
|
/**
|
|
10
9
|
* The button children type.
|
|
11
10
|
*/
|
|
@@ -35,5 +34,5 @@ interface ButtonProps {
|
|
|
35
34
|
*/
|
|
36
35
|
declare function Button(props: ButtonProps): CommandKitElement<'button-kit'>;
|
|
37
36
|
//#endregion
|
|
38
|
-
export {
|
|
39
|
-
//# sourceMappingURL=Button-
|
|
37
|
+
export { ButtonChildrenLike as n, ButtonProps as r, Button as t };
|
|
38
|
+
//# sourceMappingURL=Button-DxJLcZIU.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { EventInterceptorContextData, EventInterceptorErrorHandler } from "./EventInterceptor-
|
|
1
|
+
import { n as EventInterceptorContextData, r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
|
|
2
2
|
import { Awaitable, ButtonBuilder, ButtonInteraction, Events } from "discord.js";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
5
|
-
|
|
4
|
+
//#region src/components/interactive/button/ButtonKit.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* The predicate function that filters button interactions.
|
|
8
7
|
* It receives a ButtonInteraction and returns a boolean or a Promise that resolves to a boolean.
|
|
@@ -83,5 +82,5 @@ declare class ButtonKit extends ButtonBuilder {
|
|
|
83
82
|
dispose(): this;
|
|
84
83
|
}
|
|
85
84
|
//#endregion
|
|
86
|
-
export {
|
|
87
|
-
//# sourceMappingURL=ButtonKit-
|
|
85
|
+
export { CommandKitButtonBuilderOnEnd as a, CommandKitButtonBuilderInteractionCollectorDispatchContextData as i, ButtonKitPredicate as n, OnButtonKitClick as o, CommandKitButtonBuilderInteractionCollectorDispatch as r, OnButtonKitEnd as s, ButtonKit as t };
|
|
86
|
+
//# sourceMappingURL=ButtonKit-BfcyvWfj.d.ts.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-
|
|
2
|
-
import {
|
|
1
|
+
import { r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
|
|
2
|
+
import { a as OnSelectMenuKitSubmit, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-CCvvgnxi.js";
|
|
3
3
|
import { ChannelSelectMenuBuilder, ChannelSelectMenuInteraction } from "discord.js";
|
|
4
4
|
|
|
5
|
-
//#region src/components/
|
|
6
|
-
|
|
5
|
+
//#region src/components/interactive/select-menu/ChannelSelectMenuKit.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Type for the handler function that is called when the channel select menu is submitted.
|
|
9
8
|
*/
|
|
@@ -63,5 +62,5 @@ declare class ChannelSelectMenuKit extends ChannelSelectMenuBuilder {
|
|
|
63
62
|
dispose(): this;
|
|
64
63
|
}
|
|
65
64
|
//#endregion
|
|
66
|
-
export {
|
|
67
|
-
//# sourceMappingURL=ChannelSelectMenuKit-
|
|
65
|
+
export { ChannelSelectMenuKitPredicate as n, OnChannelSelectMenuKitSubmit as r, ChannelSelectMenuKit as t };
|
|
66
|
+
//# sourceMappingURL=ChannelSelectMenuKit-DYkudikb.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Collection } from "discord.js";
|
|
2
2
|
|
|
3
3
|
//#region src/app/router/CommandsRouter.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Represents a command with its metadata and middleware associations.
|
|
7
6
|
*/
|
|
@@ -142,5 +141,5 @@ declare class CommandsRouter {
|
|
|
142
141
|
private replaceEntrypoint;
|
|
143
142
|
}
|
|
144
143
|
//#endregion
|
|
145
|
-
export {
|
|
146
|
-
//# sourceMappingURL=CommandsRouter-
|
|
144
|
+
export { ParsedCommandData as a, Middleware as i, CommandsRouter as n, CommandsRouterOptions as r, Command as t };
|
|
145
|
+
//# sourceMappingURL=CommandsRouter-DiNoF0dq.d.ts.map
|
|
@@ -87,5 +87,5 @@ declare class EventInterceptor {
|
|
|
87
87
|
private createGlobalHandler;
|
|
88
88
|
}
|
|
89
89
|
//#endregion
|
|
90
|
-
export {
|
|
91
|
-
//# sourceMappingURL=EventInterceptor-
|
|
90
|
+
export { EventInterceptorContextData as n, EventInterceptorErrorHandler as r, EventInterceptor as t };
|
|
91
|
+
//# sourceMappingURL=EventInterceptor-D9JKMcfi.d.ts.map
|
|
@@ -86,5 +86,5 @@ declare class EventsRouter {
|
|
|
86
86
|
private scanEvent;
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
|
-
export {
|
|
90
|
-
//# sourceMappingURL=EventsRouter-
|
|
89
|
+
export { ParsedEvent as i, EventsRouterOptions as n, EventsTree as r, EventsRouter as t };
|
|
90
|
+
//# sourceMappingURL=EventsRouter-EuuSu6NH.d.ts.map
|
package/dist/{MentionableSelectMenuKit-CPTKqx-O.d.ts → MentionableSelectMenuKit-Mu4xqP6B.d.ts}
RENAMED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-
|
|
2
|
-
import {
|
|
1
|
+
import { r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
|
|
2
|
+
import { a as OnSelectMenuKitSubmit, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-CCvvgnxi.js";
|
|
3
3
|
import { MentionableSelectMenuBuilder, MentionableSelectMenuInteraction } from "discord.js";
|
|
4
4
|
|
|
5
|
-
//#region src/components/
|
|
6
|
-
|
|
5
|
+
//#region src/components/interactive/select-menu/MentionableSelectMenuKit.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Type for the handler function that is called when the mentionable select menu is submitted.
|
|
9
8
|
*/
|
|
@@ -58,5 +57,5 @@ declare class MentionableSelectMenuKit extends MentionableSelectMenuBuilder {
|
|
|
58
57
|
dispose(): this;
|
|
59
58
|
}
|
|
60
59
|
//#endregion
|
|
61
|
-
export {
|
|
62
|
-
//# sourceMappingURL=MentionableSelectMenuKit-
|
|
60
|
+
export { MentionableSelectMenuKitPredicate as n, OnMentionableSelectMenuKitSubmit as r, MentionableSelectMenuKit as t };
|
|
61
|
+
//# sourceMappingURL=MentionableSelectMenuKit-Mu4xqP6B.d.ts.map
|
|
@@ -2,7 +2,6 @@ import { ApplicationCommandOptionType, Attachment, CommandInteractionOption, Gui
|
|
|
2
2
|
import { Channel } from "diagnostics_channel";
|
|
3
3
|
|
|
4
4
|
//#region src/app/commands/MessageCommandParser.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Represents a parsed message command with its components.
|
|
8
7
|
*/
|
|
@@ -30,10 +29,10 @@ declare class MessageCommandParser {
|
|
|
30
29
|
/**
|
|
31
30
|
* Creates a new message command parser.
|
|
32
31
|
* @param message - The Discord message to parse
|
|
33
|
-
* @param prefix - Array of valid command prefixes
|
|
32
|
+
* @param prefix - Array of valid command prefixes or a regular expression
|
|
34
33
|
* @param schema - Function that returns the options schema for a command
|
|
35
34
|
*/
|
|
36
|
-
constructor(message: Message, prefix: string[], schema: (command: string) => MessageCommandOptionsSchema);
|
|
35
|
+
constructor(message: Message, prefix: string[] | RegExp, schema: (command: string) => MessageCommandOptionsSchema);
|
|
37
36
|
/**
|
|
38
37
|
* Gets the parsed command arguments.
|
|
39
38
|
* @returns Array of command arguments
|
|
@@ -191,5 +190,5 @@ declare class MessageCommandOptions {
|
|
|
191
190
|
getSubcommandGroup(required: true): string;
|
|
192
191
|
}
|
|
193
192
|
//#endregion
|
|
194
|
-
export {
|
|
195
|
-
//# sourceMappingURL=MessageCommandParser-
|
|
193
|
+
export { ParsedMessageCommand as i, MessageCommandOptionsSchema as n, MessageCommandParser as r, MessageCommandOptions as t };
|
|
194
|
+
//# sourceMappingURL=MessageCommandParser-DPCbHXCS.d.ts.map
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-
|
|
2
|
-
import { CommandKitModalBuilderInteractionCollectorDispatchContextData, OnModalKitEnd, OnModalKitSubmit } from "./ModalKit-
|
|
3
|
-
import { CommandKitElement } from "./element-
|
|
4
|
-
import { MaybeArray } from "./types-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
//#region src/components/v1/modal/Modal.d.ts
|
|
1
|
+
import { r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
|
|
2
|
+
import { i as ModalKit, n as CommandKitModalBuilderInteractionCollectorDispatchContextData, o as OnModalKitEnd, s as OnModalKitSubmit } from "./ModalKit-XJSM65SV.js";
|
|
3
|
+
import { n as CommandKitElement } from "./element-DeLvTMfZ.js";
|
|
4
|
+
import { t as MaybeArray } from "./types-DZy7U-Ld.js";
|
|
5
|
+
import { FileUploadBuilder, FileUploadComponentData, TextInputStyle } from "discord.js";
|
|
8
6
|
|
|
7
|
+
//#region src/components/interactive/modal/Modal.d.ts
|
|
9
8
|
/**
|
|
10
9
|
* The properties for the modal component.
|
|
11
10
|
*/
|
|
12
11
|
interface ModalProps {
|
|
13
12
|
customId?: string;
|
|
14
13
|
title: string;
|
|
15
|
-
children?: MaybeArray<
|
|
14
|
+
children?: MaybeArray<ModalKit['components'][number]>;
|
|
16
15
|
onSubmit?: OnModalKitSubmit;
|
|
17
16
|
onEnd?: OnModalKitEnd;
|
|
18
17
|
onError?: EventInterceptorErrorHandler;
|
|
@@ -27,7 +26,10 @@ interface ModalProps {
|
|
|
27
26
|
declare function Modal(props: ModalProps): CommandKitElement<'modal'>;
|
|
28
27
|
interface TextInputProps {
|
|
29
28
|
customId: string;
|
|
30
|
-
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated use the `<Label />` component instead.
|
|
31
|
+
*/
|
|
32
|
+
label?: string;
|
|
31
33
|
placeholder?: string;
|
|
32
34
|
maxLength?: number;
|
|
33
35
|
minLength?: number;
|
|
@@ -38,7 +40,7 @@ interface TextInputProps {
|
|
|
38
40
|
* The text input component.
|
|
39
41
|
* @param props The text input properties.
|
|
40
42
|
* @returns The commandkit element.
|
|
41
|
-
* @example <TextInput customId="input"
|
|
43
|
+
* @example <TextInput customId="input" style={TextInputStyle.Short} />
|
|
42
44
|
*/
|
|
43
45
|
declare function TextInput(props: TextInputProps & {
|
|
44
46
|
style: TextInputStyle;
|
|
@@ -57,6 +59,17 @@ declare function ShortInput(props: TextInputProps): CommandKitElement<'text-inpu
|
|
|
57
59
|
* @example <ParagraphInput customId="input" label="Input" />
|
|
58
60
|
*/
|
|
59
61
|
declare function ParagraphInput(props: TextInputProps): CommandKitElement<'text-input'>;
|
|
62
|
+
interface FileUploadProps extends Omit<FileUploadComponentData, 'type' | 'required'> {
|
|
63
|
+
id?: number;
|
|
64
|
+
required?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The file upload component.
|
|
68
|
+
* @param props The file upload properties.
|
|
69
|
+
* @returns The commandkit element.
|
|
70
|
+
* @example <FileUpload customId="file" />
|
|
71
|
+
*/
|
|
72
|
+
declare function FileUpload(props: FileUploadProps): FileUploadBuilder;
|
|
60
73
|
//#endregion
|
|
61
|
-
export {
|
|
62
|
-
//# sourceMappingURL=Modal-
|
|
74
|
+
export { ParagraphInput as a, TextInputProps as c, ModalProps as i, FileUploadProps as n, ShortInput as o, Modal as r, TextInput as s, FileUpload as t };
|
|
75
|
+
//# sourceMappingURL=Modal-v9rrcMl-.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { EventInterceptorContextData, EventInterceptorErrorHandler } from "./EventInterceptor-
|
|
1
|
+
import { n as EventInterceptorContextData, r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
|
|
2
2
|
import { Awaitable, Events, ModalBuilder, ModalSubmitInteraction } from "discord.js";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
5
|
-
|
|
4
|
+
//#region src/components/interactive/modal/ModalKit.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* The predicate function that filters modal interactions.
|
|
8
7
|
* It receives a ModalSubmitInteraction and returns a boolean or a Promise that resolves to a boolean.
|
|
@@ -83,5 +82,5 @@ declare class ModalKit extends ModalBuilder {
|
|
|
83
82
|
dispose(): this;
|
|
84
83
|
}
|
|
85
84
|
//#endregion
|
|
86
|
-
export {
|
|
87
|
-
//# sourceMappingURL=ModalKit-
|
|
85
|
+
export { ModalKitPredicate as a, ModalKit as i, CommandKitModalBuilderInteractionCollectorDispatchContextData as n, OnModalKitEnd as o, CommandKitModalBuilderOnEnd as r, OnModalKitSubmit as s, CommandKitModalBuilderInteractionCollectorDispatch as t };
|
|
86
|
+
//# sourceMappingURL=ModalKit-XJSM65SV.d.ts.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-
|
|
2
|
-
import {
|
|
1
|
+
import { r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
|
|
2
|
+
import { a as OnSelectMenuKitSubmit, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-CCvvgnxi.js";
|
|
3
3
|
import { RoleSelectMenuBuilder, RoleSelectMenuInteraction } from "discord.js";
|
|
4
4
|
|
|
5
|
-
//#region src/components/
|
|
6
|
-
|
|
5
|
+
//#region src/components/interactive/select-menu/RoleSelectMenuKit.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Type for the handler function that is called when the role select menu is submitted.
|
|
9
8
|
*/
|
|
@@ -63,5 +62,5 @@ declare class RoleSelectMenuKit extends RoleSelectMenuBuilder {
|
|
|
63
62
|
dispose(): this;
|
|
64
63
|
}
|
|
65
64
|
//#endregion
|
|
66
|
-
export {
|
|
67
|
-
//# sourceMappingURL=RoleSelectMenuKit-
|
|
65
|
+
export { RoleSelectMenuKit as n, RoleSelectMenuKitPredicate as r, OnRoleSelectMenuKitSubmit as t };
|
|
66
|
+
//# sourceMappingURL=RoleSelectMenuKit-CCjcp3HY.d.ts.map
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { MaybeArray } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
import { StringSelectMenuKit } from "./StringSelectMenuKit-
|
|
4
|
-
import { ChannelSelectMenuKit } from "./ChannelSelectMenuKit-
|
|
5
|
-
import { MentionableSelectMenuKit } from "./MentionableSelectMenuKit-
|
|
6
|
-
import { UserSelectMenuKit } from "./UserSelectMenuKit-
|
|
7
|
-
import { RoleSelectMenuKit } from "./RoleSelectMenuKit-
|
|
8
|
-
import { APISelectMenuOption, BaseSelectMenuComponentData, ChannelSelectMenuComponentData, ChannelSelectMenuInteraction, MentionableSelectMenuComponentData, MentionableSelectMenuInteraction, RoleSelectMenuComponentData, RoleSelectMenuInteraction, SelectMenuComponentOptionData, StringSelectMenuInteraction, StringSelectMenuOptionBuilder, UserSelectMenuComponentData, UserSelectMenuInteraction } from "discord.js";
|
|
9
|
-
|
|
10
|
-
//#region src/components/v1/select-menu/SelectMenu.d.ts
|
|
1
|
+
import { t as MaybeArray } from "./types-DZy7U-Ld.js";
|
|
2
|
+
import { n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-CCvvgnxi.js";
|
|
3
|
+
import { n as StringSelectMenuKit } from "./StringSelectMenuKit-G5nBTicX.js";
|
|
4
|
+
import { t as ChannelSelectMenuKit } from "./ChannelSelectMenuKit-DYkudikb.js";
|
|
5
|
+
import { t as MentionableSelectMenuKit } from "./MentionableSelectMenuKit-Mu4xqP6B.js";
|
|
6
|
+
import { n as UserSelectMenuKit } from "./UserSelectMenuKit-D3SO_fXA.js";
|
|
7
|
+
import { n as RoleSelectMenuKit } from "./RoleSelectMenuKit-CCjcp3HY.js";
|
|
8
|
+
import { APISelectMenuOption, BaseSelectMenuComponentData, ChannelSelectMenuComponentData, ChannelSelectMenuInteraction, MentionableSelectMenuComponentData, MentionableSelectMenuInteraction, RoleSelectMenuComponentData, RoleSelectMenuInteraction, SelectMenuComponentOptionData, Snowflake, StringSelectMenuInteraction, StringSelectMenuOptionBuilder, UserSelectMenuComponentData, UserSelectMenuInteraction } from "discord.js";
|
|
11
9
|
|
|
10
|
+
//#region src/components/interactive/select-menu/SelectMenu.d.ts
|
|
12
11
|
/**
|
|
13
12
|
* Type for the common properties shared by all select menu builders.
|
|
14
13
|
*/
|
|
@@ -21,7 +20,9 @@ interface CommonSelectMenuProps<T, C> {
|
|
|
21
20
|
/**
|
|
22
21
|
* Type for the base select menu component data.
|
|
23
22
|
*/
|
|
24
|
-
interface SelectMenuProps<T, C> extends Partial<Omit<BaseSelectMenuComponentData, 'type'>>, CommonSelectMenuProps<T, C> {
|
|
23
|
+
interface SelectMenuProps<T, C> extends Partial<Omit<BaseSelectMenuComponentData, 'type' | 'required'>>, CommonSelectMenuProps<T, C> {
|
|
24
|
+
required?: boolean;
|
|
25
|
+
}
|
|
25
26
|
/**
|
|
26
27
|
* The properties for a string select menu component.
|
|
27
28
|
*/
|
|
@@ -77,7 +78,9 @@ declare function StringSelectMenuOption(props: StringSelectMenuOptionProps): Str
|
|
|
77
78
|
/**
|
|
78
79
|
* The UserSelectMenu component.
|
|
79
80
|
*/
|
|
80
|
-
interface UserSelectMenuProps extends Partial<Omit<UserSelectMenuComponentData, 'type'>>, CommonSelectMenuProps<UserSelectMenuInteraction, UserSelectMenuKit> {
|
|
81
|
+
interface UserSelectMenuProps extends Partial<Omit<UserSelectMenuComponentData, 'type' | 'defaultValues'>>, CommonSelectMenuProps<UserSelectMenuInteraction, UserSelectMenuKit> {
|
|
82
|
+
defaultValues?: MaybeArray<string | Snowflake>;
|
|
83
|
+
}
|
|
81
84
|
/**
|
|
82
85
|
* The UserSelectMenu component.
|
|
83
86
|
* @param props The properties for the user select menu component.
|
|
@@ -133,5 +136,5 @@ interface ChannelSelectMenuProps extends Partial<Omit<ChannelSelectMenuComponent
|
|
|
133
136
|
*/
|
|
134
137
|
declare function ChannelSelectMenu(props: ChannelSelectMenuProps): ChannelSelectMenuKit;
|
|
135
138
|
//#endregion
|
|
136
|
-
export {
|
|
137
|
-
//# sourceMappingURL=SelectMenu-
|
|
139
|
+
export { MentionableSelectMenu as a, RoleSelectMenu as c, StringSelectMenu as d, StringSelectMenuOption as f, UserSelectMenuProps as g, UserSelectMenu as h, CommonSelectMenuProps as i, RoleSelectMenuProps as l, StringSelectMenuProps as m, ChannelSelectMenuProps as n, MentionableSelectMenuProps as o, StringSelectMenuOptionProps as p, CommonBuilderKit as r, ResolveBuilderInteraction as s, ChannelSelectMenu as t, SelectMenuProps as u };
|
|
140
|
+
//# sourceMappingURL=SelectMenu-CY0vvoSu.d.ts.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-
|
|
2
|
-
import {
|
|
1
|
+
import { r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
|
|
2
|
+
import { a as OnSelectMenuKitSubmit, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-CCvvgnxi.js";
|
|
3
3
|
import { StringSelectMenuBuilder, StringSelectMenuInteraction } from "discord.js";
|
|
4
4
|
|
|
5
|
-
//#region src/components/
|
|
6
|
-
|
|
5
|
+
//#region src/components/interactive/select-menu/StringSelectMenuKit.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Type for the handler function that is called when the string select menu is submitted.
|
|
9
8
|
*/
|
|
@@ -63,5 +62,5 @@ declare class StringSelectMenuKit extends StringSelectMenuBuilder {
|
|
|
63
62
|
dispose(): this;
|
|
64
63
|
}
|
|
65
64
|
//#endregion
|
|
66
|
-
export {
|
|
67
|
-
//# sourceMappingURL=StringSelectMenuKit-
|
|
65
|
+
export { StringSelectMenuKit as n, StringSelectMenuKitPredicate as r, OnStringSelectMenuKitSubmit as t };
|
|
66
|
+
//# sourceMappingURL=StringSelectMenuKit-G5nBTicX.d.ts.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-
|
|
2
|
-
import {
|
|
1
|
+
import { r as EventInterceptorErrorHandler } from "./EventInterceptor-D9JKMcfi.js";
|
|
2
|
+
import { a as OnSelectMenuKitSubmit, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-CCvvgnxi.js";
|
|
3
3
|
import { UserSelectMenuBuilder, UserSelectMenuInteraction } from "discord.js";
|
|
4
4
|
|
|
5
|
-
//#region src/components/
|
|
6
|
-
|
|
5
|
+
//#region src/components/interactive/select-menu/UserSelectMenuKit.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Type for the handler function that is called when the user select menu is submitted.
|
|
9
8
|
*/
|
|
@@ -63,5 +62,5 @@ declare class UserSelectMenuKit extends UserSelectMenuBuilder {
|
|
|
63
62
|
dispose(): this;
|
|
64
63
|
}
|
|
65
64
|
//#endregion
|
|
66
|
-
export {
|
|
67
|
-
//# sourceMappingURL=UserSelectMenuKit-
|
|
65
|
+
export { UserSelectMenuKit as n, UserSelectMenuKitPredicate as r, OnUserSelectMenuKitSubmit as t };
|
|
66
|
+
//# sourceMappingURL=UserSelectMenuKit-D3SO_fXA.d.ts.map
|
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
|
-
import "../ButtonKit-C7r7RPNf.js";
|
|
4
|
-
import "../ModalKit-Btz58KYn.js";
|
|
5
|
-
import "../element-CAXu1XtK.js";
|
|
6
|
-
import "../ActionRow-DKnFVDME.js";
|
|
7
|
-
import "../types-CJ-XvOFN.js";
|
|
8
|
-
import "../Button-4ZUXdA56.js";
|
|
9
|
-
import "../Modal-C6UTRdYQ.js";
|
|
10
|
-
import "../common-DOCvOVC4.js";
|
|
11
|
-
import "../StringSelectMenuKit-Bhs8U6WI.js";
|
|
12
|
-
import "../ChannelSelectMenuKit-BrXvBYNH.js";
|
|
13
|
-
import "../MentionableSelectMenuKit-CPTKqx-O.js";
|
|
14
|
-
import "../UserSelectMenuKit-CfqFJdxz.js";
|
|
15
|
-
import "../RoleSelectMenuKit-C26lU3sN.js";
|
|
16
|
-
import "../SelectMenu-Diy87_ba.js";
|
|
17
|
-
import "../container-DHBELeJ3.js";
|
|
18
|
-
import "../file-DTrr-p09.js";
|
|
19
|
-
import "../media-gallery-BMsXSot3.js";
|
|
20
|
-
import "../section-Dh_FhPeC.js";
|
|
21
|
-
import "../separator-CMf6Cyy5.js";
|
|
22
|
-
import "../text-display-DRw3r_lK.js";
|
|
23
|
-
import "../index-DSBMRX9A.js";
|
|
24
|
-
import "../index-DdqikUQD.js";
|
|
25
|
-
import "../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../signals-SHg7J1U_.js";
|
|
27
|
-
import "../helpers-Wg6P5fRQ.js";
|
|
28
|
-
import "../CommandsRouter-CoOA7hkf.js";
|
|
29
|
-
import "../EventsRouter-BacqK6z3.js";
|
|
30
|
-
import "../index-DKcmsWXw.js";
|
|
31
|
-
import "../constants-MKu-Q1jh.js";
|
|
1
|
+
import { n as FilterFunction, t as AnalyticsEngine } from "../analytics-engine-DnRsHBId.js";
|
|
32
2
|
export { AnalyticsEngine, FilterFunction };
|