commandkit 1.2.0-rc.12 → 1.2.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{COPYING.md → LICENSE.md} +3 -3
- package/README.md +3 -3
- 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-B-7n9MMr.d.ts → ActionRow-B-CGmjDp.d.ts} +3 -4
- package/dist/{ActionRow-uJxU4UGo.js → ActionRow-CSN_UKmM.js} +2 -3
- package/dist/{ActionRow-uJxU4UGo.js.map → ActionRow-CSN_UKmM.js.map} +1 -1
- package/dist/{Button-RMp-w8HV.d.ts → Button-C-GPeFA3.d.ts} +6 -7
- package/dist/{ButtonKit-9k4yfhYD.d.ts → ButtonKit-DKu0VAe4.d.ts} +36 -37
- package/dist/ChannelSelectMenuKit-HQZ4hH5s.d.ts +66 -0
- package/dist/{CommandKitEventsChannel-2l9Za-le.js → CommandKitEventsChannel-CnT5ymYe.js} +2 -2
- package/dist/{CommandKitEventsChannel-2l9Za-le.js.map → CommandKitEventsChannel-CnT5ymYe.js.map} +1 -1
- package/dist/{CommandsRouter-CBdsqaWK.d.ts → CommandsRouter-C7dZEepB.d.ts} +49 -50
- package/dist/{CommandsRouter-CWMipIis.js → CommandsRouter-C_HLsrGX.js} +2 -6
- package/dist/{CommandsRouter-CWMipIis.js.map → CommandsRouter-C_HLsrGX.js.map} +1 -1
- package/dist/{CompilerPlugin-CZ4412Zm.js → CompilerPlugin-CUsGAfgl.js} +2 -2
- package/dist/{CompilerPlugin-CZ4412Zm.js.map → CompilerPlugin-CUsGAfgl.js.map} +1 -1
- package/dist/EventInterceptor-BWoEJMHZ.js.map +1 -1
- package/dist/{EventInterceptor-x-R2qshQ.d.ts → EventInterceptor-CZmWpS08.d.ts} +40 -40
- package/dist/{EventWorkerContext-D_9q1Bm2.js → EventWorkerContext-Dfhgv329.js} +2 -3
- package/dist/{EventWorkerContext-D_9q1Bm2.js.map → EventWorkerContext-Dfhgv329.js.map} +1 -1
- package/dist/EventsRouter-DZ37r54v.d.ts +90 -0
- package/dist/{EventsRouter-C04XqRKf.js → EventsRouter-DZYIha6m.js} +2 -6
- package/dist/{EventsRouter-C04XqRKf.js.map → EventsRouter-DZYIha6m.js.map} +1 -1
- package/dist/MentionableSelectMenuKit-7URDUM3-.d.ts +61 -0
- package/dist/{MessageCommandParser-CKh-tM97.js → MessageCommandParser-Bs9fimmd.js} +2 -3
- package/dist/{MessageCommandParser-CKh-tM97.js.map → MessageCommandParser-Bs9fimmd.js.map} +1 -1
- package/dist/MessageCommandParser-q3dQcE5N.d.ts +194 -0
- package/dist/{Modal-Calb46SJ.d.ts → Modal-CZT9MZsy.d.ts} +20 -10
- package/dist/{ModalKit-Cq2ns6jv.d.ts → ModalKit-BWXI3Z26.d.ts} +33 -34
- package/dist/{PluginCommon-CPWV5xuX.js → PluginCommon-BLxWww5u.js} +6 -7
- package/dist/{PluginCommon-CPWV5xuX.js.map → PluginCommon-BLxWww5u.js.map} +1 -1
- package/dist/RoleSelectMenuKit-BY-JJ18w.d.ts +66 -0
- package/dist/{RuntimePlugin-COeXe8rP.js → RuntimePlugin-CtobluSU.js} +2 -2
- package/dist/{RuntimePlugin-COeXe8rP.js.map → RuntimePlugin-CtobluSU.js.map} +1 -1
- package/dist/{SelectMenu-VcDhOGoJ.d.ts → SelectMenu-q_b3Mjv9.d.ts} +9 -10
- package/dist/StringSelectMenuKit-lVhUMc3g.d.ts +66 -0
- package/dist/UserSelectMenuKit-CCj4Fpkr.d.ts +66 -0
- package/dist/analytics/analytics-engine.d.ts +1 -33
- package/dist/analytics/analytics-engine.js +22 -37
- package/dist/analytics/analytics-provider.d.ts +1 -33
- package/dist/analytics/constants.js +1 -1
- package/dist/analytics/utils.js +22 -37
- package/dist/{analytics-engine-NOInIjv8.d.ts → analytics-engine-WQhXmx3H.d.ts} +844 -841
- package/dist/app/commands/AppCommandRunner.d.ts +1 -33
- package/dist/app/commands/AppCommandRunner.js +22 -37
- package/dist/app/commands/Context.d.ts +1 -33
- package/dist/app/commands/Context.js +22 -37
- package/dist/app/commands/MessageCommandParser.d.ts +1 -1
- package/dist/app/commands/MessageCommandParser.js +1 -2
- package/dist/app/commands/helpers.d.ts +1 -1
- package/dist/app/commands/helpers.js +1 -1
- package/dist/app/events/EventWorkerContext.d.ts +42 -35
- package/dist/app/events/EventWorkerContext.js +1 -1
- package/dist/app/handlers/AppCommandHandler.d.ts +1 -33
- package/dist/app/handlers/AppCommandHandler.js +22 -37
- package/dist/app/handlers/AppEventsHandler.d.ts +1 -33
- package/dist/app/handlers/AppEventsHandler.js +22 -37
- package/dist/app/index.d.ts +4 -33
- package/dist/app/index.js +22 -38
- package/dist/app/interrupt/signals.d.ts +1 -1
- package/dist/app/interrupt/signals.js +2 -3
- package/dist/app/middlewares/permissions.d.ts +1 -33
- package/dist/app/middlewares/permissions.js +22 -37
- package/dist/app/register/CommandRegistrar.d.ts +1 -33
- package/dist/app/register/CommandRegistrar.js +22 -37
- 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 +2 -3
- package/dist/app/router/index.js +2 -2
- package/dist/{chunk-nOFOJqeH.js → chunk-kSYXY2_d.js} +10 -6
- package/dist/cli/app-process.d.ts +0 -1
- package/dist/cli/app-process.js +62 -7
- package/dist/cli/app-process.js.map +1 -0
- package/dist/cli/build.d.ts +2 -33
- package/dist/cli/build.js +189 -42
- package/dist/cli/build.js.map +1 -0
- package/dist/cli/common.d.ts +1 -33
- package/dist/cli/common.js +4 -4
- package/dist/cli/development.d.ts +18 -1
- package/dist/cli/development.js +41 -49
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/env.d.ts +4 -0
- package/dist/cli/env.js +1 -1
- package/dist/cli/generators.js +5 -8
- package/dist/cli/generators.js.map +1 -1
- package/dist/cli/information.js +5 -5
- package/dist/cli/information.js.map +1 -1
- package/dist/cli/init.d.ts +12 -2
- package/dist/cli/init.js +100 -39
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/production.d.ts +0 -1
- package/dist/cli/production.js +36 -49
- package/dist/cli/production.js.map +1 -1
- package/dist/cli/type-checker.js +5 -5
- package/dist/cli/utils.d.ts +0 -1
- package/dist/cli/utils.js +17 -2
- package/dist/cli/utils.js.map +1 -0
- package/dist/{colors-DL3ucTiT.js → colors-Csc0X4QJ.js} +2 -3
- package/dist/{colors-DL3ucTiT.js.map → colors-Csc0X4QJ.js.map} +1 -1
- package/dist/{commandkit-DabqpQ6v.js → commandkit-SIjTLD2R.js} +145 -46
- package/dist/commandkit-SIjTLD2R.js.map +1 -0
- package/dist/commandkit.d.ts +1 -33
- package/dist/commandkit.js +22 -37
- package/dist/{common-CCx-FJI4.js → common-CEordwf3.js} +1 -1
- package/dist/{common-CCx-FJI4.js.map → common-CEordwf3.js.map} +1 -1
- package/dist/{common-fIO6fqGZ.js → common-DSRs_mfw.js} +9 -12
- package/dist/{common-fIO6fqGZ.js.map → common-DSRs_mfw.js.map} +1 -1
- package/dist/{common-DHTTnX82.d.ts → common-DnwCYit8.d.ts} +3 -4
- package/dist/components/common/EventInterceptor.d.ts +1 -1
- package/dist/components/common/element.d.ts +1 -4
- package/dist/components/common/types.d.ts +1 -1
- package/dist/components/common/types.js +0 -1
- package/dist/components/display/common.d.ts +0 -1
- package/dist/components/display/common.js +1 -1
- package/dist/components/display/container.d.ts +1 -1
- package/dist/components/display/container.js +1 -2
- package/dist/components/display/file.d.ts +1 -1
- package/dist/components/display/file.js +1 -1
- package/dist/components/display/index.d.ts +8 -9
- package/dist/components/display/index.js +8 -9
- package/dist/components/display/label.d.ts +1 -1
- package/dist/components/display/label.js +1 -2
- package/dist/components/display/media-gallery.d.ts +1 -1
- package/dist/components/display/media-gallery.js +1 -2
- package/dist/components/display/poll.d.ts +1 -1
- package/dist/components/display/poll.js +1 -1
- package/dist/components/display/section.d.ts +1 -1
- package/dist/components/display/section.js +1 -2
- package/dist/components/display/separator.d.ts +1 -1
- package/dist/components/display/separator.js +1 -1
- package/dist/components/display/text-display.d.ts +1 -1
- package/dist/components/display/text-display.js +1 -1
- package/dist/components/index.d.ts +23 -26
- package/dist/components/index.js +23 -36
- package/dist/components/interactive/action-row/ActionRow.d.ts +1 -5
- package/dist/components/interactive/action-row/ActionRow.js +1 -1
- package/dist/components/interactive/button/Button.d.ts +1 -6
- package/dist/components/interactive/button/Button.js +22 -37
- package/dist/components/interactive/button/ButtonKit.d.ts +1 -2
- package/dist/components/interactive/button/ButtonKit.js +22 -37
- package/dist/components/interactive/modal/Modal.d.ts +2 -7
- package/dist/components/interactive/modal/Modal.js +23 -37
- package/dist/components/interactive/modal/ModalKit.d.ts +1 -2
- package/dist/components/interactive/modal/ModalKit.js +22 -37
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +22 -37
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +22 -37
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +22 -37
- package/dist/components/interactive/select-menu/SelectMenu.d.ts +1 -9
- package/dist/components/interactive/select-menu/SelectMenu.js +22 -37
- package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/StringSelectMenuKit.js +22 -37
- package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/UserSelectMenuKit.js +22 -37
- package/dist/components/interactive/select-menu/common.d.ts +1 -2
- package/dist/components/interactive/select-menu/common.js +0 -1
- package/dist/config/config.d.ts +15 -35
- package/dist/config/config.js +22 -37
- package/dist/config/default.d.ts +1 -33
- package/dist/config/default.js +22 -37
- package/dist/config/loader.d.ts +1 -33
- package/dist/config/loader.js +22 -37
- package/dist/config/types.d.ts +1 -33
- package/dist/config/utils.d.ts +1 -33
- package/dist/constants-BFFK-hfP.js +27 -0
- package/dist/{constants-AH-9qJ89.js.map → constants-BFFK-hfP.js.map} +1 -1
- package/dist/{constants-DqnSDZ6l.d.ts → constants-CuYW0K10.d.ts} +14 -8
- package/dist/{constants-D0dawKxO.js → constants-Cw8VjCVz.js} +2 -3
- package/dist/{constants-D0dawKxO.js.map → constants-Cw8VjCVz.js.map} +1 -1
- package/dist/{constants-BMWH2YUr.js → constants-CxkFFZ7p.js} +16 -1
- package/dist/constants-CxkFFZ7p.js.map +1 -0
- package/dist/{constants-CCFSX2NG.d.ts → constants-EpKcj0dH.d.ts} +2 -2
- package/dist/{container-DC0eQigs.js → container-DCPljKVH.js} +3 -4
- package/dist/{container-DC0eQigs.js.map → container-DCPljKVH.js.map} +1 -1
- package/dist/{container-1ltvkavy.d.ts → container-DYcb7zGw.d.ts} +2 -3
- package/dist/context/async-context.d.ts +1 -33
- package/dist/context/async-context.js +22 -37
- package/dist/context/environment.d.ts +1 -33
- package/dist/context/environment.js +22 -37
- package/dist/element-DibzzA5L.js.map +1 -1
- package/dist/{element-CvNhvLZ8.d.ts → element-wQo0heGj.d.ts} +4 -5
- package/dist/{env-8yY-6pbC.js → env-CmspDhHy.js} +7 -3
- package/dist/env-CmspDhHy.js.map +1 -0
- package/dist/error-codes-Ds0bnPvT.js.map +1 -1
- package/dist/events/CommandKitEventsChannel.d.ts +1 -33
- package/dist/events/CommandKitEventsChannel.js +1 -1
- package/dist/{file-DAUOZYhC.js → file-Ca1kpEtE.js} +2 -3
- package/dist/{file-DAUOZYhC.js.map → file-Ca1kpEtE.js.map} +1 -1
- package/dist/{file-n2yl_-vl.d.ts → file-CrV4lSnl.d.ts} +2 -3
- package/dist/flags/FlagProvider.d.ts +1 -33
- package/dist/flags/feature-flags.d.ts +1 -33
- package/dist/flags/feature-flags.js +163 -41
- package/dist/flags/feature-flags.js.map +1 -0
- package/dist/flags/store.d.ts +1 -33
- package/dist/flags/store.js +1 -1
- package/dist/{helpers-hDh_tMb6.d.ts → helpers-AQPLVY35.d.ts} +2 -3
- package/dist/{helpers-D2_1jih6.js → helpers-Btx1FSZx.js} +2 -3
- package/dist/{helpers-D2_1jih6.js.map → helpers-Btx1FSZx.js.map} +1 -1
- package/dist/index.d.ts +41 -44
- package/dist/index.js +39 -45
- package/dist/index.js.map +1 -1
- package/dist/kv/constants.d.ts +1 -1
- package/dist/kv/constants.js +1 -1
- package/dist/kv/dotprops.js +25 -3
- package/dist/kv/dotprops.js.map +1 -0
- package/dist/kv/kv.d.ts +289 -290
- package/dist/kv/kv.js +14 -16
- package/dist/kv/kv.js.map +1 -1
- package/dist/kv/serde.d.ts +12 -3
- package/dist/kv/serde.js +86 -4
- package/dist/kv/serde.js.map +1 -0
- package/dist/{label-D0KXeBhk.d.ts → label-37kaNWMH.d.ts} +4 -5
- package/dist/{label-D-uJWRZ0.js → label-B6vXvwLM.js} +4 -5
- package/dist/{label-D-uJWRZ0.js.map → label-B6vXvwLM.js.map} +1 -1
- package/dist/logger/DefaultLogger.d.ts +66 -3
- package/dist/logger/DefaultLogger.js +22 -37
- package/dist/logger/ILogger.d.ts +64 -2
- package/dist/logger/ILogger.js +0 -1
- package/dist/logger/Logger.d.ts +36 -3
- package/dist/logger/Logger.js +22 -37
- package/dist/logger/NoopLogger.d.ts +36 -37
- package/dist/{media-gallery-BzG70ued.d.ts → media-gallery-Ci3I4ElH.d.ts} +2 -3
- package/dist/{media-gallery-BLhwe5lO.js → media-gallery-u3gjX7yD.js} +3 -4
- package/dist/{media-gallery-BLhwe5lO.js.map → media-gallery-u3gjX7yD.js.map} +1 -1
- package/dist/plugins/CompilerPlugin.d.ts +1 -33
- package/dist/plugins/CompilerPlugin.js +1 -2
- package/dist/plugins/PluginCommon.d.ts +1 -33
- package/dist/plugins/PluginCommon.js +1 -1
- package/dist/plugins/RuntimePlugin.d.ts +1 -33
- package/dist/plugins/RuntimePlugin.js +1 -2
- package/dist/plugins/index.d.ts +1 -33
- package/dist/plugins/index.js +24 -37
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -33
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +22 -37
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -33
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +22 -37
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -33
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +22 -37
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -33
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +22 -37
- package/dist/plugins/plugin-runtime/runtime.d.ts +1 -33
- package/dist/plugins/plugin-runtime/runtime.js +0 -1
- package/dist/plugins/types.d.ts +1 -33
- package/dist/plugins/types.js +0 -1
- package/dist/{poll-Bc6rjeUS.js → poll-CFe8yvoJ.js} +12 -13
- package/dist/{poll-Bc6rjeUS.js.map → poll-CFe8yvoJ.js.map} +1 -1
- package/dist/{poll-HnaJcB0o.d.ts → poll-Ddtapd6n.d.ts} +8 -9
- package/dist/{resolve-file-url-CJoD0FAn.js → resolve-file-url-CdHqwWs3.js} +2 -2
- package/dist/{resolve-file-url-CJoD0FAn.js.map → resolve-file-url-CdHqwWs3.js.map} +1 -1
- package/dist/{section-BMcHN97i.js → section-BC8LF-B2.js} +3 -4
- package/dist/{section-BMcHN97i.js.map → section-BC8LF-B2.js.map} +1 -1
- package/dist/{section-BOaJKXiy.d.ts → section-DkUKULnB.d.ts} +2 -3
- package/dist/{separator-C___2K-f.js → separator-BUTiW7uz.js} +2 -3
- package/dist/{separator-C___2K-f.js.map → separator-BUTiW7uz.js.map} +1 -1
- package/dist/{separator-Cb7-6T6N.d.ts → separator-CbXsIFCa.d.ts} +2 -3
- package/dist/{signals-Cnqe9dFV.js → signals-B8z1wJ6W.js} +2 -2
- package/dist/{signals-Cnqe9dFV.js.map → signals-B8z1wJ6W.js.map} +1 -1
- package/dist/{signals-DBS60vTo.d.ts → signals-BbTgTc0i.d.ts} +2 -2
- package/dist/{store-ZwL2gN6a.js → store-D8r_hryO.js} +2 -3
- package/dist/{store-ZwL2gN6a.js.map → store-D8r_hryO.js.map} +1 -1
- package/dist/{text-display-B_hpz50P.d.ts → text-display-D7j39VC-.d.ts} +2 -3
- package/dist/{text-display-BtQR88kY.js → text-display-DANahMN3.js} +2 -3
- package/dist/{text-display-BtQR88kY.js.map → text-display-DANahMN3.js.map} +1 -1
- package/dist/{type-checker-CEFHoQoV.js → type-checker-cVd3Hpnh.js} +4 -6
- package/dist/{type-checker-CEFHoQoV.js.map → type-checker-cVd3Hpnh.js.map} +1 -1
- package/dist/{types-CJ-XvOFN.d.ts → types-BywA9d2Z.d.ts} +2 -2
- package/dist/{types-package-D11rQXLs.js → types-package-CsTNfvv2.js} +3 -6
- package/dist/{types-package-D11rQXLs.js.map → types-package-CsTNfvv2.js.map} +1 -1
- package/dist/types.d.ts +1 -33
- package/dist/utils/colors.js +1 -1
- package/dist/utils/constants.d.ts +2 -2
- package/dist/utils/constants.js +3 -2
- package/dist/utils/dev-hooks.d.ts +1 -33
- package/dist/utils/dev-hooks.js +22 -37
- package/dist/utils/error-codes.d.ts +54 -2
- package/dist/utils/resolve-file-url.d.ts +11 -2
- package/dist/utils/resolve-file-url.js +1 -1
- package/dist/utils/types-package.js +2 -2
- package/dist/utils/useful-stuff/async-queue.d.ts +21 -21
- package/dist/utils/useful-stuff/mutex.d.ts +62 -62
- package/dist/utils/useful-stuff/ratelimiter.d.ts +56 -56
- package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
- package/dist/utils/useful-stuff/semaphore.d.ts +82 -82
- package/dist/utils/utilities.d.ts +113 -2
- package/dist/utils/utilities.js +25 -38
- package/dist/utils-Br3eenD1.js.map +1 -1
- package/dist/version.d.ts +8 -2
- package/dist/version.js +12 -2
- package/dist/version.js.map +1 -0
- package/dist/warning-CszH8HeS.js.map +1 -1
- package/hooks.cjs +11 -4
- package/package.json +14 -7
- package/dist/ChannelSelectMenuKit-CsYgIyKe.d.ts +0 -67
- package/dist/DefaultLogger-CHMVsizQ.d.ts +0 -67
- package/dist/EventWorkerContext-CLhZRHhH.d.ts +0 -43
- package/dist/EventsRouter-4pT6vj-U.d.ts +0 -90
- package/dist/ILogger-BQ2ew4zR.d.ts +0 -64
- package/dist/Logger-DyV7oli4.d.ts +0 -37
- package/dist/MentionableSelectMenuKit-CO9phWMf.d.ts +0 -62
- package/dist/MessageCommandParser-DEOl_ifb.d.ts +0 -195
- package/dist/RoleSelectMenuKit-DvBxzpWh.d.ts +0 -67
- package/dist/StringSelectMenuKit-CJ0MzUZJ.d.ts +0 -67
- package/dist/UserSelectMenuKit-C_J-9RJs.d.ts +0 -67
- package/dist/app-CrjK9yWX.js +0 -0
- package/dist/app-process-AQ3Cbf6j.js +0 -68
- package/dist/app-process-AQ3Cbf6j.js.map +0 -1
- package/dist/build-BYMHMOl_.js +0 -173
- package/dist/build-BYMHMOl_.js.map +0 -1
- package/dist/commandkit-DabqpQ6v.js.map +0 -1
- package/dist/common-0Iw8ZeM6.js +0 -0
- package/dist/config-DbgXt6mf.d.ts +0 -16
- package/dist/constants-AH-9qJ89.js +0 -27
- package/dist/constants-BMWH2YUr.js.map +0 -1
- package/dist/dotprops-DvJUE8fw.js +0 -36
- package/dist/dotprops-DvJUE8fw.js.map +0 -1
- package/dist/env-8yY-6pbC.js.map +0 -1
- package/dist/error-codes-BiNRVMiV.d.ts +0 -54
- package/dist/feature-flags-BoBV4Dsj.js +0 -160
- package/dist/feature-flags-BoBV4Dsj.js.map +0 -1
- package/dist/init-CBb0StSB.js +0 -91
- package/dist/init-CBb0StSB.js.map +0 -1
- package/dist/init-DSYckXwx.d.ts +0 -13
- package/dist/resolve-file-url-DFtR8jRR.d.ts +0 -11
- package/dist/serde-D4H23l2F.d.ts +0 -12
- package/dist/serde-DHHwhltz.js +0 -97
- package/dist/serde-DHHwhltz.js.map +0 -1
- package/dist/utilities-CQUaua43.d.ts +0 -87
- package/dist/utils-Bf-3Eevb.js +0 -23
- package/dist/utils-Bf-3Eevb.js.map +0 -1
- package/dist/version-DC4j2ZwU.js +0 -18
- package/dist/version-DC4j2ZwU.js.map +0 -1
- package/dist/version-DggMfP_1.d.ts +0 -8
- /package/dist/{ILogger-B0q7p7L1.js → common-C2jAjX4U.js} +0 -0
- /package/dist/{index-B5F3AfVc.d.ts → index-BJfko-dP.d.ts} +0 -0
- /package/dist/{index-BLwMeReG.d.ts → index-CCggO_hw.d.ts} +0 -0
- /package/dist/{index-h64gcVNJ.d.ts → index-CLjpoGi1.d.ts} +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ILogger } from "./ILogger-BQ2ew4zR.js";
|
|
2
|
-
|
|
3
|
-
//#region src/logger/Logger.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Options for configuring the CommandKit logger.
|
|
7
|
-
*/
|
|
8
|
-
interface CommandKitLoggerOptions {
|
|
9
|
-
/**
|
|
10
|
-
* The logger provider to use.
|
|
11
|
-
*/
|
|
12
|
-
provider: ILogger;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Logger implementation for CommandKit.
|
|
16
|
-
*/
|
|
17
|
-
interface LoggerImpl extends ILogger {
|
|
18
|
-
/**
|
|
19
|
-
* Configures the logger with the specified options.
|
|
20
|
-
* @param options The logger options to apply.
|
|
21
|
-
*/
|
|
22
|
-
configure(options: CommandKitLoggerOptions): void;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Creates a new logger instance with the specified options.
|
|
26
|
-
* @param options The options for configuring the logger.
|
|
27
|
-
* @returns A new logger instance.
|
|
28
|
-
*/
|
|
29
|
-
declare function createLogger(options: CommandKitLoggerOptions): LoggerImpl;
|
|
30
|
-
/**
|
|
31
|
-
* Default logger instance for CommandKit. This logger uses the DefaultLogger as its provider.
|
|
32
|
-
* The provider can be replaced with a custom logger implementation using the `configure` method.
|
|
33
|
-
*/
|
|
34
|
-
declare const Logger: LoggerImpl;
|
|
35
|
-
//#endregion
|
|
36
|
-
export { CommandKitLoggerOptions, Logger, LoggerImpl, createLogger };
|
|
37
|
-
//# sourceMappingURL=Logger-DyV7oli4.d.ts.map
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-x-R2qshQ.js";
|
|
2
|
-
import { CommandKitSelectMenuBuilderInteractionCollectorDispatch, CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, CommandKitSelectMenuBuilderOnEnd, OnSelectMenuKitSubmit, SelectMenuKitPredicate } from "./common-DHTTnX82.js";
|
|
3
|
-
import { MentionableSelectMenuBuilder, MentionableSelectMenuInteraction } from "discord.js";
|
|
4
|
-
|
|
5
|
-
//#region src/components/interactive/select-menu/MentionableSelectMenuKit.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Type for the handler function that is called when the mentionable select menu is submitted.
|
|
9
|
-
*/
|
|
10
|
-
type OnMentionableSelectMenuKitSubmit = OnSelectMenuKitSubmit<MentionableSelectMenuInteraction, MentionableSelectMenuKit>;
|
|
11
|
-
/**
|
|
12
|
-
* Type for the predicate function that filters mentionable select menu interactions.
|
|
13
|
-
* It receives a MentionableSelectMenuInteraction and returns a boolean or a Promise that resolves to a boolean.
|
|
14
|
-
*/
|
|
15
|
-
type MentionableSelectMenuKitPredicate = SelectMenuKitPredicate<MentionableSelectMenuInteraction>;
|
|
16
|
-
declare class MentionableSelectMenuKit extends MentionableSelectMenuBuilder {
|
|
17
|
-
#private;
|
|
18
|
-
/**
|
|
19
|
-
* Sets the handler to run when the modal is submitted.
|
|
20
|
-
* @param handler - The handler to run when the modal is submitted.
|
|
21
|
-
* @param data - The context data for the interaction collector.
|
|
22
|
-
* @returns This instance of the modal builder.
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* const modal = new MentionableSelectMenuKit()
|
|
26
|
-
* .setTitle('My Modal')
|
|
27
|
-
* .setCustomId('my-modal')
|
|
28
|
-
* .filter((interaction) => interaction.Mentionable.id === '1234567890')
|
|
29
|
-
* .onSelect(async (interaction) => {
|
|
30
|
-
* await interaction.reply('You submitted the modal!');
|
|
31
|
-
* })
|
|
32
|
-
* .addComponents(actionRow1, actionRow2);
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
onSelect(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch<MentionableSelectMenuInteraction, MentionableSelectMenuKit>, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData): this;
|
|
36
|
-
/**
|
|
37
|
-
* Sets the handler to run when the interaction collector ends.
|
|
38
|
-
* @param handler - The handler to run when the interaction collector ends.
|
|
39
|
-
* @returns This instance of the modal builder.
|
|
40
|
-
*/
|
|
41
|
-
onEnd(handler: CommandKitSelectMenuBuilderOnEnd): this;
|
|
42
|
-
/**
|
|
43
|
-
* Sets the handler to run when the interaction collector ends.
|
|
44
|
-
* @param handler - The handler to run when the interaction collector ends.
|
|
45
|
-
* @returns This instance of the modal builder.
|
|
46
|
-
*/
|
|
47
|
-
onError(handler: EventInterceptorErrorHandler): this;
|
|
48
|
-
/**
|
|
49
|
-
* Sets a filter for the interaction collector.
|
|
50
|
-
* @param predicate - The filter to use for the interaction collector.
|
|
51
|
-
* @returns This instance of the modal builder.
|
|
52
|
-
*/
|
|
53
|
-
filter(predicate: SelectMenuKitPredicate<MentionableSelectMenuInteraction>): this;
|
|
54
|
-
private get customId();
|
|
55
|
-
/**
|
|
56
|
-
* Disposes of the mentionable select menu kit, cleaning up any resources used by the interaction collector.
|
|
57
|
-
*/
|
|
58
|
-
dispose(): this;
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
61
|
-
export { MentionableSelectMenuKit, MentionableSelectMenuKitPredicate, OnMentionableSelectMenuKitSubmit };
|
|
62
|
-
//# sourceMappingURL=MentionableSelectMenuKit-CO9phWMf.d.ts.map
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { ApplicationCommandOptionType, Attachment, CommandInteractionOption, GuildMember, Message, Role, User } from "discord.js";
|
|
2
|
-
import { Channel } from "diagnostics_channel";
|
|
3
|
-
|
|
4
|
-
//#region src/app/commands/MessageCommandParser.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Represents a parsed message command with its components.
|
|
8
|
-
*/
|
|
9
|
-
interface ParsedMessageCommand {
|
|
10
|
-
command: string;
|
|
11
|
-
options: {
|
|
12
|
-
name: string;
|
|
13
|
-
value: unknown;
|
|
14
|
-
}[];
|
|
15
|
-
subcommand?: string;
|
|
16
|
-
subcommandGroup?: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Schema defining the types of options for a message command.
|
|
20
|
-
*/
|
|
21
|
-
type MessageCommandOptionsSchema = Record<string, ApplicationCommandOptionType>;
|
|
22
|
-
/**
|
|
23
|
-
* Parses message content into structured command data with options and subcommands.
|
|
24
|
-
*/
|
|
25
|
-
declare class MessageCommandParser {
|
|
26
|
-
#private;
|
|
27
|
-
message: Message;
|
|
28
|
-
private prefix;
|
|
29
|
-
private schema;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a new message command parser.
|
|
32
|
-
* @param message - The Discord message to parse
|
|
33
|
-
* @param prefix - Array of valid command prefixes or a regular expression
|
|
34
|
-
* @param schema - Function that returns the options schema for a command
|
|
35
|
-
*/
|
|
36
|
-
constructor(message: Message, prefix: string[] | RegExp, schema: (command: string) => MessageCommandOptionsSchema);
|
|
37
|
-
/**
|
|
38
|
-
* Gets the parsed command arguments.
|
|
39
|
-
* @returns Array of command arguments
|
|
40
|
-
*/
|
|
41
|
-
getArgs(): string[];
|
|
42
|
-
/**
|
|
43
|
-
* Gets the message command options object for easy access to typed option values.
|
|
44
|
-
*/
|
|
45
|
-
get options(): MessageCommandOptions;
|
|
46
|
-
/**
|
|
47
|
-
* Gets a specific option value by name.
|
|
48
|
-
* @param name - The option name
|
|
49
|
-
* @returns The option value or undefined if not found
|
|
50
|
-
*/
|
|
51
|
-
getOption<T>(name: string): T | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* Gets the main command name.
|
|
54
|
-
* @returns The command name
|
|
55
|
-
*/
|
|
56
|
-
getCommand(): string;
|
|
57
|
-
/**
|
|
58
|
-
* Gets the subcommand name if present.
|
|
59
|
-
* @returns The subcommand name or undefined
|
|
60
|
-
*/
|
|
61
|
-
getSubcommand(): string | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Gets the subcommand group name if present.
|
|
64
|
-
* @returns The subcommand group name or undefined
|
|
65
|
-
*/
|
|
66
|
-
getSubcommandGroup(): string | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* Gets the prefix used in the message.
|
|
69
|
-
* @returns The matched prefix or undefined
|
|
70
|
-
*/
|
|
71
|
-
getPrefix(): string | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* Gets the full command including subcommand group and subcommand.
|
|
74
|
-
* @returns The complete command string
|
|
75
|
-
*/
|
|
76
|
-
getFullCommand(): string;
|
|
77
|
-
/**
|
|
78
|
-
* Parses the message content into structured command data.
|
|
79
|
-
* @returns The parsed command data
|
|
80
|
-
*/
|
|
81
|
-
parse(): ParsedMessageCommand;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Provides typed access to message command options with methods similar to Discord.js interaction options.
|
|
85
|
-
*/
|
|
86
|
-
declare class MessageCommandOptions {
|
|
87
|
-
private parser;
|
|
88
|
-
/**
|
|
89
|
-
* Creates a new message command options instance.
|
|
90
|
-
* @param parser - The message command parser instance
|
|
91
|
-
*/
|
|
92
|
-
constructor(parser: MessageCommandParser);
|
|
93
|
-
/**
|
|
94
|
-
* @private
|
|
95
|
-
* @internal
|
|
96
|
-
*/
|
|
97
|
-
private assertOption;
|
|
98
|
-
/**
|
|
99
|
-
* Gets a guild member from the command options.
|
|
100
|
-
* @param name - The option name
|
|
101
|
-
* @param required - Whether the option is required
|
|
102
|
-
* @returns The guild member or null if not found
|
|
103
|
-
*/
|
|
104
|
-
getMember(name: string): GuildMember | null;
|
|
105
|
-
getMember(name: string, required: true): GuildMember;
|
|
106
|
-
/**
|
|
107
|
-
* Gets an attachment from the command options.
|
|
108
|
-
* @param name - The option name
|
|
109
|
-
* @param required - Whether the option is required
|
|
110
|
-
* @returns The attachment or null if not found
|
|
111
|
-
*/
|
|
112
|
-
getAttachment(name: string): Attachment | null;
|
|
113
|
-
getAttachment(name: string, required: true): Attachment;
|
|
114
|
-
/**
|
|
115
|
-
* Gets a boolean value from the command options.
|
|
116
|
-
* @param name - The option name
|
|
117
|
-
* @param required - Whether the option is required
|
|
118
|
-
* @returns The boolean value or null if not found
|
|
119
|
-
*/
|
|
120
|
-
getBoolean(name: string): boolean | null;
|
|
121
|
-
getBoolean(name: string, required: true): boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Gets a number value from the command options.
|
|
124
|
-
* @param name - The option name
|
|
125
|
-
* @param required - Whether the option is required
|
|
126
|
-
* @returns The number value or null if not found
|
|
127
|
-
*/
|
|
128
|
-
getNumber(name: string): number | null;
|
|
129
|
-
getNumber(name: string, required: true): number;
|
|
130
|
-
/**
|
|
131
|
-
* Gets a string value from the command options.
|
|
132
|
-
* @param name - The option name
|
|
133
|
-
* @param required - Whether the option is required
|
|
134
|
-
* @returns The string value or null if not found
|
|
135
|
-
*/
|
|
136
|
-
getString(name: string): string | null;
|
|
137
|
-
getString(name: string, required: true): string;
|
|
138
|
-
/**
|
|
139
|
-
* Gets an integer value from the command options.
|
|
140
|
-
* @param name - The option name
|
|
141
|
-
* @param required - Whether the option is required
|
|
142
|
-
* @returns The integer value or null if not found
|
|
143
|
-
*/
|
|
144
|
-
getInteger(name: string): number | null;
|
|
145
|
-
getInteger(name: string, required: true): number;
|
|
146
|
-
/**
|
|
147
|
-
* Gets a user from the command options.
|
|
148
|
-
* @param name - The option name
|
|
149
|
-
* @param required - Whether the option is required
|
|
150
|
-
* @returns The user or null if not found
|
|
151
|
-
*/
|
|
152
|
-
getUser(name: string): User | null;
|
|
153
|
-
getUser(name: string, required: true): User;
|
|
154
|
-
/**
|
|
155
|
-
* Gets a channel from the command options.
|
|
156
|
-
* @param name - The option name
|
|
157
|
-
* @param required - Whether the option is required
|
|
158
|
-
* @returns The channel or null if not found
|
|
159
|
-
*/
|
|
160
|
-
getChannel(name: string): Channel | null;
|
|
161
|
-
getChannel(name: string, required: true): Channel;
|
|
162
|
-
/**
|
|
163
|
-
* Gets a role from the command options.
|
|
164
|
-
* @param name - The option name
|
|
165
|
-
* @param required - Whether the option is required
|
|
166
|
-
* @returns The role or null if not found
|
|
167
|
-
*/
|
|
168
|
-
getRole(name: string): Role | null;
|
|
169
|
-
getRole(name: string, required: true): Role;
|
|
170
|
-
/**
|
|
171
|
-
* Gets a mentionable (user, member, or role) from the command options.
|
|
172
|
-
* @param name - The option name
|
|
173
|
-
* @param required - Whether the option is required
|
|
174
|
-
* @returns The mentionable or null if not found
|
|
175
|
-
*/
|
|
176
|
-
getMentionable(name: string): NonNullable<CommandInteractionOption['member' | 'role' | 'user']> | null;
|
|
177
|
-
getMentionable(name: string, required: true): NonNullable<CommandInteractionOption['member' | 'role' | 'user']>;
|
|
178
|
-
/**
|
|
179
|
-
* Gets the subcommand name from the command.
|
|
180
|
-
* @param required - Whether the subcommand is required
|
|
181
|
-
* @returns The subcommand name or null if not found
|
|
182
|
-
*/
|
|
183
|
-
getSubcommand(): string | null;
|
|
184
|
-
getSubcommand(required: true): string;
|
|
185
|
-
/**
|
|
186
|
-
* Gets the subcommand group name from the command.
|
|
187
|
-
* @param required - Whether the subcommand group is required
|
|
188
|
-
* @returns The subcommand group name or null if not found
|
|
189
|
-
*/
|
|
190
|
-
getSubcommandGroup(): string | null;
|
|
191
|
-
getSubcommandGroup(required: true): string;
|
|
192
|
-
}
|
|
193
|
-
//#endregion
|
|
194
|
-
export { MessageCommandOptions, MessageCommandOptionsSchema, MessageCommandParser, ParsedMessageCommand };
|
|
195
|
-
//# sourceMappingURL=MessageCommandParser-DEOl_ifb.d.ts.map
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-x-R2qshQ.js";
|
|
2
|
-
import { CommandKitSelectMenuBuilderInteractionCollectorDispatch, CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, CommandKitSelectMenuBuilderOnEnd, OnSelectMenuKitSubmit, SelectMenuKitPredicate } from "./common-DHTTnX82.js";
|
|
3
|
-
import { RoleSelectMenuBuilder, RoleSelectMenuInteraction } from "discord.js";
|
|
4
|
-
|
|
5
|
-
//#region src/components/interactive/select-menu/RoleSelectMenuKit.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Type for the handler function that is called when the role select menu is submitted.
|
|
9
|
-
*/
|
|
10
|
-
type OnRoleSelectMenuKitSubmit = OnSelectMenuKitSubmit<RoleSelectMenuInteraction, RoleSelectMenuKit>;
|
|
11
|
-
/**
|
|
12
|
-
* Type for the predicate function that filters role select menu interactions.
|
|
13
|
-
* It receives a RoleSelectMenuInteraction and returns a boolean or a Promise that resolves to a boolean.
|
|
14
|
-
*/
|
|
15
|
-
type RoleSelectMenuKitPredicate = SelectMenuKitPredicate<RoleSelectMenuInteraction>;
|
|
16
|
-
/**
|
|
17
|
-
* A builder for creating role select menus with additional features like interaction collectors and event handling.
|
|
18
|
-
* This class extends the RoleSelectMenuBuilder from discord.js and adds methods for handling interactions.
|
|
19
|
-
* It allows you to set a handler for when the role select menu is submitted, filter interactions, and handle the end of the interaction collector.
|
|
20
|
-
*/
|
|
21
|
-
declare class RoleSelectMenuKit extends RoleSelectMenuBuilder {
|
|
22
|
-
#private;
|
|
23
|
-
/**
|
|
24
|
-
* Sets the handler to run when the modal is submitted.
|
|
25
|
-
* @param handler - The handler to run when the modal is submitted.
|
|
26
|
-
* @param data - The context data for the interaction collector.
|
|
27
|
-
* @returns This instance of the modal builder.
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const modal = new RoleSelectMenuKit()
|
|
31
|
-
* .setTitle('My Modal')
|
|
32
|
-
* .setCustomId('my-modal')
|
|
33
|
-
* .filter((interaction) => interaction.Role.id === '1234567890')
|
|
34
|
-
* .onSelect(async (interaction) => {
|
|
35
|
-
* await interaction.reply('You submitted the modal!');
|
|
36
|
-
* })
|
|
37
|
-
* .addComponents(actionRow1, actionRow2);
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
onSelect(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch<RoleSelectMenuInteraction, RoleSelectMenuKit>, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData): this;
|
|
41
|
-
/**
|
|
42
|
-
* Sets the handler to run when the interaction collector ends.
|
|
43
|
-
* @param handler - The handler to run when the interaction collector ends.
|
|
44
|
-
* @returns This instance of the modal builder.
|
|
45
|
-
*/
|
|
46
|
-
onEnd(handler: CommandKitSelectMenuBuilderOnEnd): this;
|
|
47
|
-
/**
|
|
48
|
-
* Sets the handler to run when the interaction collector ends.
|
|
49
|
-
* @param handler - The handler to run when the interaction collector ends.
|
|
50
|
-
* @returns This instance of the modal builder.
|
|
51
|
-
*/
|
|
52
|
-
onError(handler: EventInterceptorErrorHandler): this;
|
|
53
|
-
/**
|
|
54
|
-
* Sets a filter for the interaction collector.
|
|
55
|
-
* @param predicate - The filter to use for the interaction collector.
|
|
56
|
-
* @returns This instance of the modal builder.
|
|
57
|
-
*/
|
|
58
|
-
filter(predicate: SelectMenuKitPredicate<RoleSelectMenuInteraction>): this;
|
|
59
|
-
private get customId();
|
|
60
|
-
/**
|
|
61
|
-
* Disposes of the role select menu kit, cleaning up any resources and event listeners.
|
|
62
|
-
*/
|
|
63
|
-
dispose(): this;
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
export { OnRoleSelectMenuKitSubmit, RoleSelectMenuKit, RoleSelectMenuKitPredicate };
|
|
67
|
-
//# sourceMappingURL=RoleSelectMenuKit-DvBxzpWh.d.ts.map
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-x-R2qshQ.js";
|
|
2
|
-
import { CommandKitSelectMenuBuilderInteractionCollectorDispatch, CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, CommandKitSelectMenuBuilderOnEnd, OnSelectMenuKitSubmit, SelectMenuKitPredicate } from "./common-DHTTnX82.js";
|
|
3
|
-
import { StringSelectMenuBuilder, StringSelectMenuInteraction } from "discord.js";
|
|
4
|
-
|
|
5
|
-
//#region src/components/interactive/select-menu/StringSelectMenuKit.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Type for the handler function that is called when the string select menu is submitted.
|
|
9
|
-
*/
|
|
10
|
-
type OnStringSelectMenuKitSubmit = OnSelectMenuKitSubmit<StringSelectMenuInteraction, StringSelectMenuKit>;
|
|
11
|
-
/**
|
|
12
|
-
* Type for the predicate function that filters string select menu interactions.
|
|
13
|
-
* It receives a StringSelectMenuInteraction and returns a boolean or a Promise that resolves to a boolean.
|
|
14
|
-
*/
|
|
15
|
-
type StringSelectMenuKitPredicate = SelectMenuKitPredicate<StringSelectMenuInteraction>;
|
|
16
|
-
/**
|
|
17
|
-
* A builder for creating string select menus with additional features like interaction collectors and event handling.
|
|
18
|
-
* This class extends the StringSelectMenuBuilder from discord.js and adds methods for handling interactions.
|
|
19
|
-
* It allows you to set a handler for when the string select menu is submitted, filter interactions, and handle the end of the interaction collector.
|
|
20
|
-
*/
|
|
21
|
-
declare class StringSelectMenuKit extends StringSelectMenuBuilder {
|
|
22
|
-
#private;
|
|
23
|
-
/**
|
|
24
|
-
* Sets the handler to run when the modal is submitted.
|
|
25
|
-
* @param handler - The handler to run when the modal is submitted.
|
|
26
|
-
* @param data - The context data for the interaction collector.
|
|
27
|
-
* @returns This instance of the modal builder.
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const modal = new StringSelectMenuKit()
|
|
31
|
-
* .setTitle('My Modal')
|
|
32
|
-
* .setCustomId('my-modal')
|
|
33
|
-
* .filter((interaction) => interaction.user.id === '1234567890')
|
|
34
|
-
* .onSelect(async (interaction) => {
|
|
35
|
-
* await interaction.reply('You submitted the modal!');
|
|
36
|
-
* })
|
|
37
|
-
* .addComponents(actionRow1, actionRow2);
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
onSelect(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch<StringSelectMenuInteraction, StringSelectMenuKit>, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData): this;
|
|
41
|
-
/**
|
|
42
|
-
* Sets the handler to run when the interaction collector ends.
|
|
43
|
-
* @param handler - The handler to run when the interaction collector ends.
|
|
44
|
-
* @returns This instance of the modal builder.
|
|
45
|
-
*/
|
|
46
|
-
onEnd(handler: CommandKitSelectMenuBuilderOnEnd): this;
|
|
47
|
-
/**
|
|
48
|
-
* Sets the handler to run when the interaction collector ends.
|
|
49
|
-
* @param handler - The handler to run when the interaction collector ends.
|
|
50
|
-
* @returns This instance of the modal builder.
|
|
51
|
-
*/
|
|
52
|
-
onError(handler: EventInterceptorErrorHandler): this;
|
|
53
|
-
/**
|
|
54
|
-
* Sets a filter for the interaction collector.
|
|
55
|
-
* @param predicate - The filter to use for the interaction collector.
|
|
56
|
-
* @returns This instance of the modal builder.
|
|
57
|
-
*/
|
|
58
|
-
filter(predicate: SelectMenuKitPredicate<StringSelectMenuInteraction>): this;
|
|
59
|
-
private get customId();
|
|
60
|
-
/**
|
|
61
|
-
* Disposes of the interaction collector and cleans up resources.
|
|
62
|
-
*/
|
|
63
|
-
dispose(): this;
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
export { OnStringSelectMenuKitSubmit, StringSelectMenuKit, StringSelectMenuKitPredicate };
|
|
67
|
-
//# sourceMappingURL=StringSelectMenuKit-CJ0MzUZJ.d.ts.map
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { EventInterceptorErrorHandler } from "./EventInterceptor-x-R2qshQ.js";
|
|
2
|
-
import { CommandKitSelectMenuBuilderInteractionCollectorDispatch, CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, CommandKitSelectMenuBuilderOnEnd, OnSelectMenuKitSubmit, SelectMenuKitPredicate } from "./common-DHTTnX82.js";
|
|
3
|
-
import { UserSelectMenuBuilder, UserSelectMenuInteraction } from "discord.js";
|
|
4
|
-
|
|
5
|
-
//#region src/components/interactive/select-menu/UserSelectMenuKit.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Type for the handler function that is called when the user select menu is submitted.
|
|
9
|
-
*/
|
|
10
|
-
type OnUserSelectMenuKitSubmit = OnSelectMenuKitSubmit<UserSelectMenuInteraction, UserSelectMenuKit>;
|
|
11
|
-
/**
|
|
12
|
-
* Type for the predicate function that filters user select menu interactions.
|
|
13
|
-
* It receives a UserSelectMenuInteraction and returns a boolean or a Promise that resolves to a boolean.
|
|
14
|
-
*/
|
|
15
|
-
type UserSelectMenuKitPredicate = SelectMenuKitPredicate<UserSelectMenuInteraction>;
|
|
16
|
-
/**
|
|
17
|
-
* A builder for creating user select menus with additional features like interaction collectors and event handling.
|
|
18
|
-
* This class extends the UserSelectMenuBuilder from discord.js and adds methods for handling interactions.
|
|
19
|
-
* It allows you to set a handler for when the user select menu is submitted, filter interactions, and handle the end of the interaction collector.
|
|
20
|
-
*/
|
|
21
|
-
declare class UserSelectMenuKit extends UserSelectMenuBuilder {
|
|
22
|
-
#private;
|
|
23
|
-
/**
|
|
24
|
-
* Sets the handler to run when the modal is submitted.
|
|
25
|
-
* @param handler - The handler to run when the modal is submitted.
|
|
26
|
-
* @param data - The context data for the interaction collector.
|
|
27
|
-
* @returns This instance of the modal builder.
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const modal = new UserSelectMenuKit()
|
|
31
|
-
* .setTitle('My Modal')
|
|
32
|
-
* .setCustomId('my-modal')
|
|
33
|
-
* .filter((interaction) => interaction.user.id === '1234567890')
|
|
34
|
-
* .onSelect(async (interaction) => {
|
|
35
|
-
* await interaction.reply('You submitted the modal!');
|
|
36
|
-
* })
|
|
37
|
-
* .addComponents(actionRow1, actionRow2);
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
onSelect(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch<UserSelectMenuInteraction, UserSelectMenuKit>, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData): this;
|
|
41
|
-
/**
|
|
42
|
-
* Sets the handler to run when the interaction collector ends.
|
|
43
|
-
* @param handler - The handler to run when the interaction collector ends.
|
|
44
|
-
* @returns This instance of the modal builder.
|
|
45
|
-
*/
|
|
46
|
-
onEnd(handler: CommandKitSelectMenuBuilderOnEnd): this;
|
|
47
|
-
/**
|
|
48
|
-
* Sets the handler to run when the interaction collector ends.
|
|
49
|
-
* @param handler - The handler to run when the interaction collector ends.
|
|
50
|
-
* @returns This instance of the modal builder.
|
|
51
|
-
*/
|
|
52
|
-
onError(handler: EventInterceptorErrorHandler): this;
|
|
53
|
-
/**
|
|
54
|
-
* Sets a filter for the interaction collector.
|
|
55
|
-
* @param predicate - The filter to use for the interaction collector.
|
|
56
|
-
* @returns This instance of the modal builder.
|
|
57
|
-
*/
|
|
58
|
-
filter(predicate: SelectMenuKitPredicate<UserSelectMenuInteraction>): this;
|
|
59
|
-
private get customId();
|
|
60
|
-
/**
|
|
61
|
-
* Disposes of the user select menu kit, cleaning up any collectors and handlers.
|
|
62
|
-
*/
|
|
63
|
-
dispose(): this;
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
export { OnUserSelectMenuKitSubmit, UserSelectMenuKit, UserSelectMenuKitPredicate };
|
|
67
|
-
//# sourceMappingURL=UserSelectMenuKit-C_J-9RJs.d.ts.map
|
package/dist/app-CrjK9yWX.js
DELETED
|
File without changes
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
|
-
const require_common = require('./common-fIO6fqGZ.js');
|
|
3
|
-
const require_env = require('./env-8yY-6pbC.js');
|
|
4
|
-
let node_fs = require("node:fs");
|
|
5
|
-
node_fs = require_chunk.__toESM(node_fs);
|
|
6
|
-
let node_path = require("node:path");
|
|
7
|
-
node_path = require_chunk.__toESM(node_path);
|
|
8
|
-
let node_child_process = require("node:child_process");
|
|
9
|
-
node_child_process = require_chunk.__toESM(node_child_process);
|
|
10
|
-
|
|
11
|
-
//#region src/cli/app-process.ts
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
function getStdio(supportsCommands) {
|
|
17
|
-
if (supportsCommands) return [
|
|
18
|
-
"pipe",
|
|
19
|
-
"pipe",
|
|
20
|
-
"pipe",
|
|
21
|
-
"ipc"
|
|
22
|
-
];
|
|
23
|
-
return [
|
|
24
|
-
"pipe",
|
|
25
|
-
"pipe",
|
|
26
|
-
"pipe"
|
|
27
|
-
];
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @private
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
function createAppProcess(fileName, cwd, isDev) {
|
|
34
|
-
var _ps$stdout, _ps$stderr;
|
|
35
|
-
if (!(0, node_fs.existsSync)((0, node_path.join)(cwd, fileName))) require_common.panic(`Could not locate the entrypoint file: ${fileName}`);
|
|
36
|
-
const stdio = getStdio(isDev);
|
|
37
|
-
const baseArgs = [`--title="CommandKit ${isDev ? "Development" : "Production"}"`, "--enable-source-maps"];
|
|
38
|
-
const nodeOptions = process.env.CK_NODE_OPTIONS || process.env.NODE_OPTIONS;
|
|
39
|
-
let nodeArgs = [...baseArgs];
|
|
40
|
-
if (nodeOptions) {
|
|
41
|
-
const options = nodeOptions.trim().split(/\s+/);
|
|
42
|
-
for (const option of options) {
|
|
43
|
-
const optionName = option.split("=")[0];
|
|
44
|
-
const existingIndex = nodeArgs.findIndex((arg) => arg.startsWith(optionName));
|
|
45
|
-
if (existingIndex !== -1) nodeArgs[existingIndex] = option;
|
|
46
|
-
else nodeArgs.push(option);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
nodeArgs.push(fileName);
|
|
50
|
-
const ps = (0, node_child_process.spawn)("node", nodeArgs, {
|
|
51
|
-
cwd,
|
|
52
|
-
windowsHide: true,
|
|
53
|
-
env: isDev ? require_env.DevEnv() : require_env.ProdEnv(),
|
|
54
|
-
stdio
|
|
55
|
-
});
|
|
56
|
-
(_ps$stdout = ps.stdout) === null || _ps$stdout === void 0 || _ps$stdout.pipe(process.stdout);
|
|
57
|
-
(_ps$stderr = ps.stderr) === null || _ps$stderr === void 0 || _ps$stderr.pipe(process.stderr);
|
|
58
|
-
return ps;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
Object.defineProperty(exports, 'createAppProcess', {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function () {
|
|
65
|
-
return createAppProcess;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
//# sourceMappingURL=app-process-AQ3Cbf6j.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-process-AQ3Cbf6j.js","names":[],"sources":["../src/cli/app-process.ts"],"sourcesContent":["import { IOType, spawn } from 'node:child_process';\nimport { DevEnv, ProdEnv } from './env';\nimport { join } from 'node:path';\nimport { existsSync } from 'node:fs';\nimport { panic } from './common';\n\n/**\n * @private\n * @internal\n */\nfunction getStdio(supportsCommands: boolean) {\n if (supportsCommands) {\n return ['pipe', 'pipe', 'pipe', 'ipc'];\n }\n\n return ['pipe', 'pipe', 'pipe'];\n}\n\n/**\n * @private\n * @internal\n */\nexport function createAppProcess(\n fileName: string,\n cwd: string,\n isDev: boolean,\n) {\n if (!existsSync(join(cwd, fileName))) {\n panic(`Could not locate the entrypoint file: ${fileName}`);\n }\n\n const stdio = getStdio(isDev) as IOType[];\n\n const baseArgs = [\n `--title=\"CommandKit ${isDev ? 'Development' : 'Production'}\"`,\n '--enable-source-maps',\n ];\n\n const nodeOptions = process.env.CK_NODE_OPTIONS || process.env.NODE_OPTIONS;\n let nodeArgs = [...baseArgs];\n\n if (nodeOptions) {\n const options = nodeOptions.trim().split(/\\s+/);\n\n for (const option of options) {\n const optionName = option.split('=')[0];\n const existingIndex = nodeArgs.findIndex((arg) =>\n arg.startsWith(optionName),\n );\n\n if (existingIndex !== -1) {\n nodeArgs[existingIndex] = option;\n } else {\n nodeArgs.push(option);\n }\n }\n }\n\n nodeArgs.push(fileName);\n\n const ps = spawn('node', nodeArgs, {\n cwd,\n windowsHide: true,\n env: isDev ? DevEnv() : ProdEnv(),\n stdio,\n });\n\n ps.stdout?.pipe(process.stdout);\n ps.stderr?.pipe(process.stderr);\n\n return ps;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAUA,SAAS,SAAS,kBAA2B;AAC3C,KAAI,iBACF,QAAO;EAAC;EAAQ;EAAQ;EAAQ;EAAM;AAGxC,QAAO;EAAC;EAAQ;EAAQ;EAAO;;;;;;AAOjC,SAAgB,iBAChB,UACA,KACA,OACA;;AACE,KAAI,6CAAiB,KAAK,SAAS,CAAC,CAClC,sBAAM,yCAAyC,WAAW;CAG5D,MAAM,QAAQ,SAAS,MAAM;CAE7B,MAAM,WAAW,CACjB,uBAAuB,QAAQ,gBAAgB,aAAa,IAC5D,uBAAuB;CAGvB,MAAM,cAAc,QAAQ,IAAI,mBAAmB,QAAQ,IAAI;CAC/D,IAAI,WAAW,CAAC,GAAG,SAAS;AAE5B,KAAI,aAAa;EACf,MAAM,UAAU,YAAY,MAAM,CAAC,MAAM,MAAM;AAE/C,OAAK,MAAM,UAAU,SAAS;GAC5B,MAAM,aAAa,OAAO,MAAM,IAAI,CAAC;GACrC,MAAM,gBAAgB,SAAS,WAAW,QAC1C,IAAI,WAAW,WAAW,CACzB;AAED,OAAI,kBAAkB,GACpB,UAAS,iBAAiB;OAE1B,UAAS,KAAK,OAAO;;;AAK3B,UAAS,KAAK,SAAS;CAEvB,MAAM,mCAAW,QAAQ,UAAU;EACjC;EACA,aAAa;EACb,KAAK,QAAQ,oBAAQ,GAAG,qBAAS;EACjC;EACD,CAAC;AAEF,kBAAG,wDAAQ,KAAK,QAAQ,OAAO;AAC/B,kBAAG,wDAAQ,KAAK,QAAQ,OAAO;AAE/B,QAAO"}
|