@azurioh/discord-kernel 0.1.0
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 +21 -0
- package/README.md +77 -0
- package/dist/authz/authorizer.d.ts +45 -0
- package/dist/authz/authorizer.d.ts.map +1 -0
- package/dist/authz/authorizer.js +31 -0
- package/dist/authz/authorizer.js.map +1 -0
- package/dist/authz/require-level-guard.d.ts +23 -0
- package/dist/authz/require-level-guard.d.ts.map +1 -0
- package/dist/authz/require-level-guard.js +37 -0
- package/dist/authz/require-level-guard.js.map +1 -0
- package/dist/clock.d.ts +13 -0
- package/dist/clock.d.ts.map +1 -0
- package/dist/clock.js +13 -0
- package/dist/clock.js.map +1 -0
- package/dist/concurrency/keyed-queue.d.ts +18 -0
- package/dist/concurrency/keyed-queue.d.ts.map +1 -0
- package/dist/concurrency/keyed-queue.js +37 -0
- package/dist/concurrency/keyed-queue.js.map +1 -0
- package/dist/concurrency/run-with-concurrency.d.ts +15 -0
- package/dist/concurrency/run-with-concurrency.d.ts.map +1 -0
- package/dist/concurrency/run-with-concurrency.js +40 -0
- package/dist/concurrency/run-with-concurrency.js.map +1 -0
- package/dist/config/env.d.ts +17 -0
- package/dist/config/env.d.ts.map +1 -0
- package/dist/config/env.js +49 -0
- package/dist/config/env.js.map +1 -0
- package/dist/config/errors.d.ts +14 -0
- package/dist/config/errors.d.ts.map +1 -0
- package/dist/config/errors.js +25 -0
- package/dist/config/errors.js.map +1 -0
- package/dist/datetime.d.ts +34 -0
- package/dist/datetime.d.ts.map +1 -0
- package/dist/datetime.js +188 -0
- package/dist/datetime.js.map +1 -0
- package/dist/discord/api-errors.d.ts +20 -0
- package/dist/discord/api-errors.d.ts.map +1 -0
- package/dist/discord/api-errors.js +90 -0
- package/dist/discord/api-errors.js.map +1 -0
- package/dist/discord/channel-exporter.d.ts +42 -0
- package/dist/discord/channel-exporter.d.ts.map +1 -0
- package/dist/discord/channel-exporter.js +3 -0
- package/dist/discord/channel-exporter.js.map +1 -0
- package/dist/discord/command/autocomplete-dispatcher.d.ts +26 -0
- package/dist/discord/command/autocomplete-dispatcher.d.ts.map +1 -0
- package/dist/discord/command/autocomplete-dispatcher.js +41 -0
- package/dist/discord/command/autocomplete-dispatcher.js.map +1 -0
- package/dist/discord/command/autocomplete.d.ts +18 -0
- package/dist/discord/command/autocomplete.d.ts.map +1 -0
- package/dist/discord/command/autocomplete.js +65 -0
- package/dist/discord/command/autocomplete.js.map +1 -0
- package/dist/discord/command/context.d.ts +33 -0
- package/dist/discord/command/context.d.ts.map +1 -0
- package/dist/discord/command/context.js +48 -0
- package/dist/discord/command/context.js.map +1 -0
- package/dist/discord/command/cooldown-guard.d.ts +25 -0
- package/dist/discord/command/cooldown-guard.d.ts.map +1 -0
- package/dist/discord/command/cooldown-guard.js +60 -0
- package/dist/discord/command/cooldown-guard.js.map +1 -0
- package/dist/discord/command/create-command.d.ts +100 -0
- package/dist/discord/command/create-command.d.ts.map +1 -0
- package/dist/discord/command/create-command.js +245 -0
- package/dist/discord/command/create-command.js.map +1 -0
- package/dist/discord/command/create-context-menu-command.d.ts +51 -0
- package/dist/discord/command/create-context-menu-command.d.ts.map +1 -0
- package/dist/discord/command/create-context-menu-command.js +128 -0
- package/dist/discord/command/create-context-menu-command.js.map +1 -0
- package/dist/discord/command/errors.d.ts +19 -0
- package/dist/discord/command/errors.d.ts.map +1 -0
- package/dist/discord/command/errors.js +27 -0
- package/dist/discord/command/errors.js.map +1 -0
- package/dist/discord/command/guard.d.ts +30 -0
- package/dist/discord/command/guard.d.ts.map +1 -0
- package/dist/discord/command/guard.js +34 -0
- package/dist/discord/command/guard.js.map +1 -0
- package/dist/discord/command/localization.d.ts +9 -0
- package/dist/discord/command/localization.d.ts.map +1 -0
- package/dist/discord/command/localization.js +13 -0
- package/dist/discord/command/localization.js.map +1 -0
- package/dist/discord/command/options.d.ts +113 -0
- package/dist/discord/command/options.d.ts.map +1 -0
- package/dist/discord/command/options.js +509 -0
- package/dist/discord/command/options.js.map +1 -0
- package/dist/discord/command/permission-guard.d.ts +21 -0
- package/dist/discord/command/permission-guard.d.ts.map +1 -0
- package/dist/discord/command/permission-guard.js +69 -0
- package/dist/discord/command/permission-guard.js.map +1 -0
- package/dist/discord/command/router.d.ts +48 -0
- package/dist/discord/command/router.d.ts.map +1 -0
- package/dist/discord/command/router.js +118 -0
- package/dist/discord/command/router.js.map +1 -0
- package/dist/discord/command/types.d.ts +51 -0
- package/dist/discord/command/types.d.ts.map +1 -0
- package/dist/discord/command/types.js +3 -0
- package/dist/discord/command/types.js.map +1 -0
- package/dist/discord/components/component-router.d.ts +116 -0
- package/dist/discord/components/component-router.d.ts.map +1 -0
- package/dist/discord/components/component-router.js +123 -0
- package/dist/discord/components/component-router.js.map +1 -0
- package/dist/discord/components/interactive-message/index.d.ts +3 -0
- package/dist/discord/components/interactive-message/index.d.ts.map +1 -0
- package/dist/discord/components/interactive-message/index.js +11 -0
- package/dist/discord/components/interactive-message/index.js.map +1 -0
- package/dist/discord/components/interactive-message/interactive-message-collector.d.ts +195 -0
- package/dist/discord/components/interactive-message/interactive-message-collector.d.ts.map +1 -0
- package/dist/discord/components/interactive-message/interactive-message-collector.js +151 -0
- package/dist/discord/components/interactive-message/interactive-message-collector.js.map +1 -0
- package/dist/discord/components/interactive-message/mount-interactive-message.d.ts +30 -0
- package/dist/discord/components/interactive-message/mount-interactive-message.d.ts.map +1 -0
- package/dist/discord/components/interactive-message/mount-interactive-message.js +44 -0
- package/dist/discord/components/interactive-message/mount-interactive-message.js.map +1 -0
- package/dist/discord/components/paginator/index.d.ts +5 -0
- package/dist/discord/components/paginator/index.d.ts.map +1 -0
- package/dist/discord/components/paginator/index.js +15 -0
- package/dist/discord/components/paginator/index.js.map +1 -0
- package/dist/discord/components/paginator/mount-paginator.d.ts +25 -0
- package/dist/discord/components/paginator/mount-paginator.d.ts.map +1 -0
- package/dist/discord/components/paginator/mount-paginator.js +41 -0
- package/dist/discord/components/paginator/mount-paginator.js.map +1 -0
- package/dist/discord/components/paginator/page-state.d.ts +21 -0
- package/dist/discord/components/paginator/page-state.d.ts.map +1 -0
- package/dist/discord/components/paginator/page-state.js +44 -0
- package/dist/discord/components/paginator/page-state.js.map +1 -0
- package/dist/discord/components/paginator/paginator-buttons.d.ts +17 -0
- package/dist/discord/components/paginator/paginator-buttons.d.ts.map +1 -0
- package/dist/discord/components/paginator/paginator-buttons.js +45 -0
- package/dist/discord/components/paginator/paginator-buttons.js.map +1 -0
- package/dist/discord/components/paginator/paginator-view.d.ts +26 -0
- package/dist/discord/components/paginator/paginator-view.d.ts.map +1 -0
- package/dist/discord/components/paginator/paginator-view.js +28 -0
- package/dist/discord/components/paginator/paginator-view.js.map +1 -0
- package/dist/discord/components/persistent-paginator.d.ts +47 -0
- package/dist/discord/components/persistent-paginator.d.ts.map +1 -0
- package/dist/discord/components/persistent-paginator.js +137 -0
- package/dist/discord/components/persistent-paginator.js.map +1 -0
- package/dist/discord/components/settings-editor/index.d.ts +7 -0
- package/dist/discord/components/settings-editor/index.d.ts.map +1 -0
- package/dist/discord/components/settings-editor/index.js +22 -0
- package/dist/discord/components/settings-editor/index.js.map +1 -0
- package/dist/discord/components/settings-editor/mount-settings-editor.d.ts +140 -0
- package/dist/discord/components/settings-editor/mount-settings-editor.d.ts.map +1 -0
- package/dist/discord/components/settings-editor/mount-settings-editor.js +344 -0
- package/dist/discord/components/settings-editor/mount-settings-editor.js.map +1 -0
- package/dist/discord/components/settings-editor/navigation.d.ts +49 -0
- package/dist/discord/components/settings-editor/navigation.d.ts.map +1 -0
- package/dist/discord/components/settings-editor/navigation.js +39 -0
- package/dist/discord/components/settings-editor/navigation.js.map +1 -0
- package/dist/discord/components/settings-editor/settings-editor-card.view.d.ts +56 -0
- package/dist/discord/components/settings-editor/settings-editor-card.view.d.ts.map +1 -0
- package/dist/discord/components/settings-editor/settings-editor-card.view.js +284 -0
- package/dist/discord/components/settings-editor/settings-editor-card.view.js.map +1 -0
- package/dist/discord/components/settings-editor/settings-editor-field-modal.d.ts +69 -0
- package/dist/discord/components/settings-editor/settings-editor-field-modal.d.ts.map +1 -0
- package/dist/discord/components/settings-editor/settings-editor-field-modal.js +353 -0
- package/dist/discord/components/settings-editor/settings-editor-field-modal.js.map +1 -0
- package/dist/discord/components/settings-editor/settings-editor-fields.d.ts +216 -0
- package/dist/discord/components/settings-editor/settings-editor-fields.d.ts.map +1 -0
- package/dist/discord/components/settings-editor/settings-editor-fields.js +66 -0
- package/dist/discord/components/settings-editor/settings-editor-fields.js.map +1 -0
- package/dist/discord/components/settings-editor/settings-editor.view.d.ts +303 -0
- package/dist/discord/components/settings-editor/settings-editor.view.d.ts.map +1 -0
- package/dist/discord/components/settings-editor/settings-editor.view.js +316 -0
- package/dist/discord/components/settings-editor/settings-editor.view.js.map +1 -0
- package/dist/discord/events/create-event.d.ts +5 -0
- package/dist/discord/events/create-event.d.ts.map +1 -0
- package/dist/discord/events/create-event.js +8 -0
- package/dist/discord/events/create-event.js.map +1 -0
- package/dist/discord/events/event-router.d.ts +16 -0
- package/dist/discord/events/event-router.d.ts.map +1 -0
- package/dist/discord/events/event-router.js +51 -0
- package/dist/discord/events/event-router.js.map +1 -0
- package/dist/discord/events/types.d.ts +16 -0
- package/dist/discord/events/types.d.ts.map +1 -0
- package/dist/discord/events/types.js +3 -0
- package/dist/discord/events/types.js.map +1 -0
- package/dist/discord/i18n.d.ts +58 -0
- package/dist/discord/i18n.d.ts.map +1 -0
- package/dist/discord/i18n.js +173 -0
- package/dist/discord/i18n.js.map +1 -0
- package/dist/discord/interaction/button.d.ts +39 -0
- package/dist/discord/interaction/button.d.ts.map +1 -0
- package/dist/discord/interaction/button.js +36 -0
- package/dist/discord/interaction/button.js.map +1 -0
- package/dist/discord/interaction/interaction-router.d.ts +21 -0
- package/dist/discord/interaction/interaction-router.d.ts.map +1 -0
- package/dist/discord/interaction/interaction-router.js +24 -0
- package/dist/discord/interaction/interaction-router.js.map +1 -0
- package/dist/discord/interaction/modal.d.ts +171 -0
- package/dist/discord/interaction/modal.d.ts.map +1 -0
- package/dist/discord/interaction/modal.js +264 -0
- package/dist/discord/interaction/modal.js.map +1 -0
- package/dist/discord/interaction/select-menu.d.ts +104 -0
- package/dist/discord/interaction/select-menu.d.ts.map +1 -0
- package/dist/discord/interaction/select-menu.js +126 -0
- package/dist/discord/interaction/select-menu.js.map +1 -0
- package/dist/discord/permissions.d.ts +32 -0
- package/dist/discord/permissions.d.ts.map +1 -0
- package/dist/discord/permissions.js +40 -0
- package/dist/discord/permissions.js.map +1 -0
- package/dist/discord/placeholder-registry-errors.d.ts +10 -0
- package/dist/discord/placeholder-registry-errors.d.ts.map +1 -0
- package/dist/discord/placeholder-registry-errors.js +18 -0
- package/dist/discord/placeholder-registry-errors.js.map +1 -0
- package/dist/discord/placeholder-registry.d.ts +53 -0
- package/dist/discord/placeholder-registry.d.ts.map +1 -0
- package/dist/discord/placeholder-registry.js +52 -0
- package/dist/discord/placeholder-registry.js.map +1 -0
- package/dist/discord/presenter.d.ts +26 -0
- package/dist/discord/presenter.d.ts.map +1 -0
- package/dist/discord/presenter.js +3 -0
- package/dist/discord/presenter.js.map +1 -0
- package/dist/discord/ui/card.d.ts +114 -0
- package/dist/discord/ui/card.d.ts.map +1 -0
- package/dist/discord/ui/card.js +162 -0
- package/dist/discord/ui/card.js.map +1 -0
- package/dist/discord/ui/color-input-errors.d.ts +12 -0
- package/dist/discord/ui/color-input-errors.d.ts.map +1 -0
- package/dist/discord/ui/color-input-errors.js +21 -0
- package/dist/discord/ui/color-input-errors.js.map +1 -0
- package/dist/discord/ui/color-input.d.ts +37 -0
- package/dist/discord/ui/color-input.d.ts.map +1 -0
- package/dist/discord/ui/color-input.js +166 -0
- package/dist/discord/ui/color-input.js.map +1 -0
- package/dist/discord/ui/colors.d.ts +44 -0
- package/dist/discord/ui/colors.d.ts.map +1 -0
- package/dist/discord/ui/colors.js +45 -0
- package/dist/discord/ui/colors.js.map +1 -0
- package/dist/discord/ui/embed.d.ts +16 -0
- package/dist/discord/ui/embed.d.ts.map +1 -0
- package/dist/discord/ui/embed.js +53 -0
- package/dist/discord/ui/embed.js.map +1 -0
- package/dist/discord/ui/message-attachments.d.ts +40 -0
- package/dist/discord/ui/message-attachments.d.ts.map +1 -0
- package/dist/discord/ui/message-attachments.js +27 -0
- package/dist/discord/ui/message-attachments.js.map +1 -0
- package/dist/errors/business-error.d.ts +41 -0
- package/dist/errors/business-error.d.ts.map +1 -0
- package/dist/errors/business-error.js +39 -0
- package/dist/errors/business-error.js.map +1 -0
- package/dist/errors/describe-error.d.ts +29 -0
- package/dist/errors/describe-error.d.ts.map +1 -0
- package/dist/errors/describe-error.js +49 -0
- package/dist/errors/describe-error.js.map +1 -0
- package/dist/errors/incident-ref.d.ts +7 -0
- package/dist/errors/incident-ref.d.ts.map +1 -0
- package/dist/errors/incident-ref.js +13 -0
- package/dist/errors/incident-ref.js.map +1 -0
- package/dist/errors/index.d.ts +4 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +15 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/i18n/business-message.d.ts +14 -0
- package/dist/i18n/business-message.d.ts.map +1 -0
- package/dist/i18n/business-message.js +19 -0
- package/dist/i18n/business-message.js.map +1 -0
- package/dist/i18n/catalog.d.ts +27 -0
- package/dist/i18n/catalog.d.ts.map +1 -0
- package/dist/i18n/catalog.js +25 -0
- package/dist/i18n/catalog.js.map +1 -0
- package/dist/i18n/errors.d.ts +10 -0
- package/dist/i18n/errors.d.ts.map +1 -0
- package/dist/i18n/errors.js +18 -0
- package/dist/i18n/errors.js.map +1 -0
- package/dist/i18n/index.d.ts +6 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +16 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/locale.d.ts +22 -0
- package/dist/i18n/locale.d.ts.map +1 -0
- package/dist/i18n/locale.js +40 -0
- package/dist/i18n/locale.js.map +1 -0
- package/dist/i18n/translator.d.ts +35 -0
- package/dist/i18n/translator.d.ts.map +1 -0
- package/dist/i18n/translator.js +40 -0
- package/dist/i18n/translator.js.map +1 -0
- package/dist/logger.d.ts +28 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +3 -0
- package/dist/logger.js.map +1 -0
- package/dist/module/module.d.ts +42 -0
- package/dist/module/module.d.ts.map +1 -0
- package/dist/module/module.js +3 -0
- package/dist/module/module.js.map +1 -0
- package/dist/persistence/database.d.ts +24 -0
- package/dist/persistence/database.d.ts.map +1 -0
- package/dist/persistence/database.js +3 -0
- package/dist/persistence/database.js.map +1 -0
- package/dist/resilience/retry.d.ts +36 -0
- package/dist/resilience/retry.d.ts.map +1 -0
- package/dist/resilience/retry.js +78 -0
- package/dist/resilience/retry.js.map +1 -0
- package/dist/scheduler/errors.d.ts +25 -0
- package/dist/scheduler/errors.d.ts.map +1 -0
- package/dist/scheduler/errors.js +45 -0
- package/dist/scheduler/errors.js.map +1 -0
- package/dist/scheduler/scheduler.d.ts +68 -0
- package/dist/scheduler/scheduler.d.ts.map +1 -0
- package/dist/scheduler/scheduler.js +162 -0
- package/dist/scheduler/scheduler.js.map +1 -0
- package/package.json +89 -0
- package/src/authz/authorizer.ts +76 -0
- package/src/authz/require-level-guard.ts +42 -0
- package/src/clock.ts +18 -0
- package/src/concurrency/keyed-queue.ts +50 -0
- package/src/concurrency/run-with-concurrency.ts +44 -0
- package/src/config/env.ts +58 -0
- package/src/config/errors.ts +21 -0
- package/src/datetime.ts +221 -0
- package/src/discord/api-errors.ts +91 -0
- package/src/discord/channel-exporter.ts +48 -0
- package/src/discord/command/autocomplete-dispatcher.ts +54 -0
- package/src/discord/command/autocomplete.ts +76 -0
- package/src/discord/command/context.ts +85 -0
- package/src/discord/command/cooldown-guard.ts +81 -0
- package/src/discord/command/create-command.ts +431 -0
- package/src/discord/command/create-context-menu-command.ts +227 -0
- package/src/discord/command/errors.ts +22 -0
- package/src/discord/command/guard.ts +54 -0
- package/src/discord/command/localization.ts +11 -0
- package/src/discord/command/options.ts +847 -0
- package/src/discord/command/permission-guard.ts +74 -0
- package/src/discord/command/router.ts +142 -0
- package/src/discord/command/types.ts +52 -0
- package/src/discord/components/component-router.ts +213 -0
- package/src/discord/components/interactive-message/index.ts +18 -0
- package/src/discord/components/interactive-message/interactive-message-collector.ts +374 -0
- package/src/discord/components/interactive-message/mount-interactive-message.ts +71 -0
- package/src/discord/components/paginator/index.ts +17 -0
- package/src/discord/components/paginator/mount-paginator.ts +69 -0
- package/src/discord/components/paginator/page-state.ts +45 -0
- package/src/discord/components/paginator/paginator-buttons.ts +60 -0
- package/src/discord/components/paginator/paginator-view.ts +61 -0
- package/src/discord/components/persistent-paginator.ts +197 -0
- package/src/discord/components/settings-editor/index.ts +41 -0
- package/src/discord/components/settings-editor/mount-settings-editor.ts +646 -0
- package/src/discord/components/settings-editor/navigation.ts +67 -0
- package/src/discord/components/settings-editor/settings-editor-card.view.ts +344 -0
- package/src/discord/components/settings-editor/settings-editor-field-modal.ts +538 -0
- package/src/discord/components/settings-editor/settings-editor-fields.ts +290 -0
- package/src/discord/components/settings-editor/settings-editor.view.ts +654 -0
- package/src/discord/events/create-event.ts +7 -0
- package/src/discord/events/event-router.ts +53 -0
- package/src/discord/events/types.ts +17 -0
- package/src/discord/i18n.ts +173 -0
- package/src/discord/interaction/button.ts +75 -0
- package/src/discord/interaction/interaction-router.ts +28 -0
- package/src/discord/interaction/modal.ts +505 -0
- package/src/discord/interaction/select-menu.ts +246 -0
- package/src/discord/permissions.ts +57 -0
- package/src/discord/placeholder-registry-errors.ts +11 -0
- package/src/discord/placeholder-registry.ts +77 -0
- package/src/discord/presenter.ts +26 -0
- package/src/discord/ui/card.ts +303 -0
- package/src/discord/ui/color-input-errors.ts +17 -0
- package/src/discord/ui/color-input.ts +179 -0
- package/src/discord/ui/colors.ts +58 -0
- package/src/discord/ui/embed.ts +64 -0
- package/src/discord/ui/message-attachments.ts +57 -0
- package/src/errors/business-error.ts +49 -0
- package/src/errors/describe-error.ts +73 -0
- package/src/errors/incident-ref.ts +10 -0
- package/src/errors/index.ts +12 -0
- package/src/i18n/business-message.ts +23 -0
- package/src/i18n/catalog.ts +41 -0
- package/src/i18n/errors.ts +11 -0
- package/src/i18n/index.ts +11 -0
- package/src/i18n/locale.ts +41 -0
- package/src/i18n/translator.ts +78 -0
- package/src/logger.ts +28 -0
- package/src/module/module.ts +42 -0
- package/src/persistence/database.ts +23 -0
- package/src/resilience/retry.ts +102 -0
- package/src/scheduler/errors.ts +40 -0
- package/src/scheduler/scheduler.ts +248 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createStringSelect = createStringSelect;
|
|
4
|
+
exports.createChannelSelect = createChannelSelect;
|
|
5
|
+
exports.createRoleSelect = createRoleSelect;
|
|
6
|
+
exports.createUserSelect = createUserSelect;
|
|
7
|
+
exports.createSelectRow = createSelectRow;
|
|
8
|
+
exports.createSelectHandler = createSelectHandler;
|
|
9
|
+
const discord_js_1 = require("discord.js");
|
|
10
|
+
/** Apply the options every select flavour shares onto its builder. */
|
|
11
|
+
function applyBaseOptions(builder, def, forceDisabled) {
|
|
12
|
+
builder.setCustomId(def.id);
|
|
13
|
+
if (def.placeholder !== undefined) {
|
|
14
|
+
builder.setPlaceholder(def.placeholder);
|
|
15
|
+
}
|
|
16
|
+
if (def.minValues !== undefined) {
|
|
17
|
+
builder.setMinValues(def.minValues);
|
|
18
|
+
}
|
|
19
|
+
if (def.maxValues !== undefined) {
|
|
20
|
+
builder.setMaxValues(def.maxValues);
|
|
21
|
+
}
|
|
22
|
+
builder.setDisabled(forceDisabled || (def.disabled ?? false));
|
|
23
|
+
return builder;
|
|
24
|
+
}
|
|
25
|
+
/** A menu of caller-defined string values. */
|
|
26
|
+
function createStringSelect(def) {
|
|
27
|
+
return {
|
|
28
|
+
id: def.id,
|
|
29
|
+
onSelect: def.onSelect,
|
|
30
|
+
apply(forceDisabled = false) {
|
|
31
|
+
const builder = applyBaseOptions(new discord_js_1.StringSelectMenuBuilder(), def, forceDisabled);
|
|
32
|
+
return builder.addOptions(...def.options.map((option) => ({
|
|
33
|
+
label: option.label,
|
|
34
|
+
value: option.value,
|
|
35
|
+
description: option.description,
|
|
36
|
+
emoji: option.emoji,
|
|
37
|
+
default: option.default,
|
|
38
|
+
})));
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** A menu populated by Discord with the guild's channels. */
|
|
43
|
+
function createChannelSelect(def) {
|
|
44
|
+
return {
|
|
45
|
+
id: def.id,
|
|
46
|
+
onSelect: def.onSelect,
|
|
47
|
+
apply(forceDisabled = false) {
|
|
48
|
+
const builder = applyBaseOptions(new discord_js_1.ChannelSelectMenuBuilder(), def, forceDisabled);
|
|
49
|
+
if (def.defaultChannelIds !== undefined && def.defaultChannelIds.length > 0) {
|
|
50
|
+
builder.setDefaultChannels(...def.defaultChannelIds);
|
|
51
|
+
}
|
|
52
|
+
if (def.channelTypes !== undefined) {
|
|
53
|
+
builder.setChannelTypes(...def.channelTypes);
|
|
54
|
+
}
|
|
55
|
+
return builder;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/** A menu populated by Discord with the guild's roles. */
|
|
60
|
+
function createRoleSelect(def) {
|
|
61
|
+
return {
|
|
62
|
+
id: def.id,
|
|
63
|
+
onSelect: def.onSelect,
|
|
64
|
+
apply(forceDisabled = false) {
|
|
65
|
+
const builder = applyBaseOptions(new discord_js_1.RoleSelectMenuBuilder(), def, forceDisabled);
|
|
66
|
+
if (def.defaultRoleIds !== undefined && def.defaultRoleIds.length > 0) {
|
|
67
|
+
builder.setDefaultRoles(...def.defaultRoleIds);
|
|
68
|
+
}
|
|
69
|
+
return builder;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A menu populated by Discord with the guild's members.
|
|
75
|
+
*
|
|
76
|
+
* A distinct flavour from the mentionable one on purpose: naming a person is not
|
|
77
|
+
* the same act as naming a role, and the calls behind it — adding someone to the
|
|
78
|
+
* recap's ping list, granting a user a level — take a user id, not either.
|
|
79
|
+
*/
|
|
80
|
+
function createUserSelect(def) {
|
|
81
|
+
return {
|
|
82
|
+
id: def.id,
|
|
83
|
+
onSelect: def.onSelect,
|
|
84
|
+
apply(forceDisabled = false) {
|
|
85
|
+
const builder = applyBaseOptions(new discord_js_1.UserSelectMenuBuilder(), def, forceDisabled);
|
|
86
|
+
if (def.defaultUserIds !== undefined && def.defaultUserIds.length > 0) {
|
|
87
|
+
builder.setDefaultUsers(...def.defaultUserIds);
|
|
88
|
+
}
|
|
89
|
+
return builder;
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Wrap a select menu in its own action row. Unlike buttons, Discord gives a
|
|
95
|
+
* select menu a whole row, so there is nothing to group — hence a distinct
|
|
96
|
+
* helper from `createActionRow`.
|
|
97
|
+
*/
|
|
98
|
+
function createSelectRow(menu, forceDisabled = false) {
|
|
99
|
+
return new discord_js_1.ActionRowBuilder().addComponents(menu.apply(forceDisabled));
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Bridge a select menu's `onSelect` to the persistent
|
|
103
|
+
* {@link import("../../discord/components/component-router").ComponentRouter}.
|
|
104
|
+
*
|
|
105
|
+
* Without this a declared `onSelect` would never run: the router dispatches to a
|
|
106
|
+
* `ComponentHandler`, and nothing else turns an interaction back into the menu
|
|
107
|
+
* that produced it. Register the result through a module's `components`.
|
|
108
|
+
*/
|
|
109
|
+
function createSelectHandler(menu, authorize) {
|
|
110
|
+
return {
|
|
111
|
+
customId: menu.id,
|
|
112
|
+
// Passed in rather than defaulted: this bridge knows nothing about what
|
|
113
|
+
// the menu does, and a default here would be exactly the silent "anyone
|
|
114
|
+
// may click" the required field exists to prevent.
|
|
115
|
+
authorize,
|
|
116
|
+
async handle(interaction) {
|
|
117
|
+
// The router also routes buttons and modals to a matching customId; a
|
|
118
|
+
// menu only speaks for select interactions.
|
|
119
|
+
if (!interaction.isAnySelectMenu()) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
await menu.onSelect?.({ interaction: interaction, values: interaction.values });
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=select-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-menu.js","sourceRoot":"","sources":["../../../src/discord/interaction/select-menu.ts"],"names":[],"mappings":";;AA6HA,gDAmBC;AAGD,kDAiBC;AAGD,4CAcC;AASD,4CAcC;AAOD,0CAKC;AAUD,kDAmBC;AArPD,2CAYoB;AA4FpB,sEAAsE;AACtE,SAAS,gBAAgB,CACxB,OAAU,EACV,GAAiB,EACjB,aAAsB;IAEtB,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5B,IAAI,GAAG,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IACD,IAAI,GAAG,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACjC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACrC,CAAC;IACD,IAAI,GAAG,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACjC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,CAAC,WAAW,CAAC,aAAa,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAC;IAC9D,OAAO,OAAO,CAAC;AAChB,CAAC;AAED,8CAA8C;AAC9C,SAAgB,kBAAkB,CACjC,GAAoB;IAEpB,OAAO;QACN,EAAE,EAAE,GAAG,CAAC,EAAE;QAC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,EAAE,IAAI,CAAC,EAAE;QACjB,wEAAwE;QACxE,wEAAwE;QACxE,mDAAmD;QACnD,SAAS;QACT,KAAK,CAAC,MAAM,CAAC,WAAW;YACvB,sEAAsE;YACtE,4CAA4C;YAC5C,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,EAAE,CAAC;gBACpC,OAAO;YACR,CAAC;YACD,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,WAAW,EAAE,WAAgB,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;QACtF,CAAC;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PermissionFlagsBits, PermissionsBitField } from "discord.js";
|
|
2
|
+
/**
|
|
3
|
+
* Permission helpers shared by the command DSL, the guards and any adapter that
|
|
4
|
+
* needs to reason about what the bot (or a member) is allowed to do.
|
|
5
|
+
*
|
|
6
|
+
* Everything is expressed in terms of {@link PermissionBit} rather than raw
|
|
7
|
+
* `bigint`s: the values come from discord.js' `PermissionFlagsBits`, so a typo
|
|
8
|
+
* is a type error instead of a silently wrong bitfield.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* A single Discord permission flag. Deriving the type from the enum-like object
|
|
12
|
+
* means the DSL accepts `PermissionFlagsBits.ManageChannels` and rejects an
|
|
13
|
+
* arbitrary `bigint`.
|
|
14
|
+
*/
|
|
15
|
+
export type PermissionBit = (typeof PermissionFlagsBits)[keyof typeof PermissionFlagsBits];
|
|
16
|
+
/** Combine permission flags into the single bitfield Discord's API expects. */
|
|
17
|
+
export declare function resolvePermissions(permissions: readonly PermissionBit[]): bigint;
|
|
18
|
+
/**
|
|
19
|
+
* Bits in `required` that `held` lacks (empty when everything is granted).
|
|
20
|
+
*
|
|
21
|
+
* `held === null` means the permissions could not be resolved (outside a guild,
|
|
22
|
+
* or an uncached member). It returns *all* of `required`: an absent answer must
|
|
23
|
+
* never be mistaken for a granted one.
|
|
24
|
+
*/
|
|
25
|
+
export declare function missingPermissions(held: Readonly<PermissionsBitField> | null, required: readonly PermissionBit[]): PermissionBit[];
|
|
26
|
+
/**
|
|
27
|
+
* Human-readable names for permission bits, for user-facing messages. Resolved
|
|
28
|
+
* by reverse lookup in `PermissionFlagsBits` so the names track discord.js
|
|
29
|
+
* rather than a hand-maintained table that silently rots.
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatPermissions(permissions: readonly PermissionBit[]): string;
|
|
32
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/discord/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtE;;;;;;;GAOG;AAEH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAE3F,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,CAEhF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GAAG,IAAI,EAC1C,QAAQ,EAAE,SAAS,aAAa,EAAE,GAChC,aAAa,EAAE,CAKjB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,CAE/E"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvePermissions = resolvePermissions;
|
|
4
|
+
exports.missingPermissions = missingPermissions;
|
|
5
|
+
exports.formatPermissions = formatPermissions;
|
|
6
|
+
const discord_js_1 = require("discord.js");
|
|
7
|
+
/** Combine permission flags into the single bitfield Discord's API expects. */
|
|
8
|
+
function resolvePermissions(permissions) {
|
|
9
|
+
return discord_js_1.PermissionsBitField.resolve([...permissions]);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Bits in `required` that `held` lacks (empty when everything is granted).
|
|
13
|
+
*
|
|
14
|
+
* `held === null` means the permissions could not be resolved (outside a guild,
|
|
15
|
+
* or an uncached member). It returns *all* of `required`: an absent answer must
|
|
16
|
+
* never be mistaken for a granted one.
|
|
17
|
+
*/
|
|
18
|
+
function missingPermissions(held, required) {
|
|
19
|
+
if (held === null) {
|
|
20
|
+
return [...required];
|
|
21
|
+
}
|
|
22
|
+
return required.filter((permission) => !held.has(permission));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Human-readable names for permission bits, for user-facing messages. Resolved
|
|
26
|
+
* by reverse lookup in `PermissionFlagsBits` so the names track discord.js
|
|
27
|
+
* rather than a hand-maintained table that silently rots.
|
|
28
|
+
*/
|
|
29
|
+
function formatPermissions(permissions) {
|
|
30
|
+
return permissions.map(permissionName).join(", ");
|
|
31
|
+
}
|
|
32
|
+
function permissionName(permission) {
|
|
33
|
+
for (const [name, bit] of Object.entries(discord_js_1.PermissionFlagsBits)) {
|
|
34
|
+
if (bit === permission) {
|
|
35
|
+
return name;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return String(permission);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../src/discord/permissions.ts"],"names":[],"mappings":";;AAmBA,gDAEC;AASD,gDAQC;AAOD,8CAEC;AA/CD,2CAAsE;AAkBtE,+EAA+E;AAC/E,SAAgB,kBAAkB,CAAC,WAAqC;IACvE,OAAO,gCAAmB,CAAC,OAAO,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,kBAAkB,CACjC,IAA0C,EAC1C,QAAkC;IAElC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,WAAqC;IACtE,OAAO,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,cAAc,CAAC,UAAyB;IAChD,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gCAAmB,CAAC,EAAE,CAAC;QAC/D,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC;QACb,CAAC;IACF,CAAC;IACD,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Two providers registered the same token. Raised while modules register their
|
|
3
|
+
* placeholders at boot — a wiring mistake that must stop the boot, never a
|
|
4
|
+
* runtime condition a guild's rendered text could trigger.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DuplicatePlaceholderTokenError extends Error {
|
|
7
|
+
readonly token: string;
|
|
8
|
+
constructor(token: string);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=placeholder-registry-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholder-registry-errors.d.ts","sourceRoot":"","sources":["../../src/discord/placeholder-registry-errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,8BAA+B,SAAQ,KAAK;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CAIlC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DuplicatePlaceholderTokenError = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Two providers registered the same token. Raised while modules register their
|
|
6
|
+
* placeholders at boot — a wiring mistake that must stop the boot, never a
|
|
7
|
+
* runtime condition a guild's rendered text could trigger.
|
|
8
|
+
*/
|
|
9
|
+
class DuplicatePlaceholderTokenError extends Error {
|
|
10
|
+
token;
|
|
11
|
+
constructor(token) {
|
|
12
|
+
super(`Placeholder token "${token}" is registered twice`);
|
|
13
|
+
this.token = token;
|
|
14
|
+
this.name = "DuplicatePlaceholderTokenError";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.DuplicatePlaceholderTokenError = DuplicatePlaceholderTokenError;
|
|
18
|
+
//# sourceMappingURL=placeholder-registry-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholder-registry-errors.js","sourceRoot":"","sources":["../../src/discord/placeholder-registry-errors.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,MAAa,8BAA+B,SAAQ,KAAK;IACnC;IAArB,YAAqB,KAAa;QACjC,KAAK,CAAC,sBAAsB,KAAK,uBAAuB,CAAC,CAAC;QADtC,UAAK,GAAL,KAAK,CAAQ;QAEjC,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;IAC9C,CAAC;CACD;AALD,wEAKC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Locale } from "../i18n";
|
|
2
|
+
/**
|
|
3
|
+
* A token a module offers to text another module's administrator writes,
|
|
4
|
+
* resolved only once that text is actually rendered.
|
|
5
|
+
*
|
|
6
|
+
* `core` sits between the two by design: a module that publishes a token
|
|
7
|
+
* (`tournament`'s `{tournament_template}`) and a module that renders text
|
|
8
|
+
* carrying it (`ticket`'s welcome message) never import each other —
|
|
9
|
+
* `AGENTS.md` forbids it. Both go through {@link PlaceholderRegistry} instead,
|
|
10
|
+
* which `bootstrap` hands to every module factory from the same container-held
|
|
11
|
+
* instance, so neither module ever names the other.
|
|
12
|
+
*/
|
|
13
|
+
export interface PlaceholderProvider {
|
|
14
|
+
/** The token, braces included — `{tournament_template}`. */
|
|
15
|
+
readonly token: string;
|
|
16
|
+
/** What it becomes, for one guild, at render time. */
|
|
17
|
+
resolve(guildId: string, locale: Locale): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Catalog key describing this token in the legend an admin reads while
|
|
20
|
+
* writing the text — owned by the module that offers the token, since it is
|
|
21
|
+
* the only one that knows what the token means.
|
|
22
|
+
*/
|
|
23
|
+
readonly legendKey: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Accumulates every {@link PlaceholderProvider} registered at boot and resolves
|
|
27
|
+
* them against a piece of already-rendered text.
|
|
28
|
+
*
|
|
29
|
+
* Consulted at render, never at construction — that is what makes the order
|
|
30
|
+
* `bootstrap/modules.ts` lists modules in irrelevant here: a module registers
|
|
31
|
+
* into this from its own factory, whatever position it holds in that list, and
|
|
32
|
+
* `resolve` only ever reads the registry as it stands by the time some guild's
|
|
33
|
+
* text is actually rendered — well after every module has finished
|
|
34
|
+
* registering, unlike `ChannelExporter` (`bootstrap/channel-exporter.ts`),
|
|
35
|
+
* which has to be built with the enabled module list already known.
|
|
36
|
+
*/
|
|
37
|
+
export declare class PlaceholderRegistry {
|
|
38
|
+
private readonly providers;
|
|
39
|
+
/** @throws DuplicatePlaceholderTokenError — a boot-time wiring mistake. */
|
|
40
|
+
register(provider: PlaceholderProvider): void;
|
|
41
|
+
/** Every registered provider, in registration order — for building a legend. */
|
|
42
|
+
list(): readonly PlaceholderProvider[];
|
|
43
|
+
/** The token every registered provider answers to. */
|
|
44
|
+
tokens(): readonly string[];
|
|
45
|
+
/**
|
|
46
|
+
* Replace every registered token `text` carries with what it resolves to for
|
|
47
|
+
* `guildId`/`locale`. A provider whose token is absent from `text` is never
|
|
48
|
+
* asked to resolve — the common case, since one guild's text rarely uses
|
|
49
|
+
* every token every module has ever registered.
|
|
50
|
+
*/
|
|
51
|
+
resolve(text: string, guildId: string, locale: Locale): Promise<string>;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=placeholder-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholder-registry.d.ts","sourceRoot":"","sources":["../../src/discord/placeholder-registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,mBAAmB;IACnC,4DAA4D;IAC5D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,mBAAmB;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6B;IAEvD,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI;IAO7C,gFAAgF;IAChF,IAAI,IAAI,SAAS,mBAAmB,EAAE;IAItC,sDAAsD;IACtD,MAAM,IAAI,SAAS,MAAM,EAAE;IAI3B;;;;;OAKG;IACG,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAU7E"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlaceholderRegistry = void 0;
|
|
4
|
+
const placeholder_registry_errors_1 = require("../discord/placeholder-registry-errors");
|
|
5
|
+
/**
|
|
6
|
+
* Accumulates every {@link PlaceholderProvider} registered at boot and resolves
|
|
7
|
+
* them against a piece of already-rendered text.
|
|
8
|
+
*
|
|
9
|
+
* Consulted at render, never at construction — that is what makes the order
|
|
10
|
+
* `bootstrap/modules.ts` lists modules in irrelevant here: a module registers
|
|
11
|
+
* into this from its own factory, whatever position it holds in that list, and
|
|
12
|
+
* `resolve` only ever reads the registry as it stands by the time some guild's
|
|
13
|
+
* text is actually rendered — well after every module has finished
|
|
14
|
+
* registering, unlike `ChannelExporter` (`bootstrap/channel-exporter.ts`),
|
|
15
|
+
* which has to be built with the enabled module list already known.
|
|
16
|
+
*/
|
|
17
|
+
class PlaceholderRegistry {
|
|
18
|
+
providers = [];
|
|
19
|
+
/** @throws DuplicatePlaceholderTokenError — a boot-time wiring mistake. */
|
|
20
|
+
register(provider) {
|
|
21
|
+
if (this.providers.some((existing) => existing.token === provider.token)) {
|
|
22
|
+
throw new placeholder_registry_errors_1.DuplicatePlaceholderTokenError(provider.token);
|
|
23
|
+
}
|
|
24
|
+
this.providers.push(provider);
|
|
25
|
+
}
|
|
26
|
+
/** Every registered provider, in registration order — for building a legend. */
|
|
27
|
+
list() {
|
|
28
|
+
return this.providers;
|
|
29
|
+
}
|
|
30
|
+
/** The token every registered provider answers to. */
|
|
31
|
+
tokens() {
|
|
32
|
+
return this.providers.map((provider) => provider.token);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Replace every registered token `text` carries with what it resolves to for
|
|
36
|
+
* `guildId`/`locale`. A provider whose token is absent from `text` is never
|
|
37
|
+
* asked to resolve — the common case, since one guild's text rarely uses
|
|
38
|
+
* every token every module has ever registered.
|
|
39
|
+
*/
|
|
40
|
+
async resolve(text, guildId, locale) {
|
|
41
|
+
let result = text;
|
|
42
|
+
for (const provider of this.providers) {
|
|
43
|
+
if (result.includes(provider.token)) {
|
|
44
|
+
const value = await provider.resolve(guildId, locale);
|
|
45
|
+
result = result.split(provider.token).join(value);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.PlaceholderRegistry = PlaceholderRegistry;
|
|
52
|
+
//# sourceMappingURL=placeholder-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholder-registry.js","sourceRoot":"","sources":["../../src/discord/placeholder-registry.ts"],"names":[],"mappings":";;;AAAA,uFAAuF;AA2BvF;;;;;;;;;;;GAWG;AACH,MAAa,mBAAmB;IACd,SAAS,GAA0B,EAAE,CAAC;IAEvD,2EAA2E;IAC3E,QAAQ,CAAC,QAA6B;QACrC,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1E,MAAM,IAAI,4DAA8B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAED,gFAAgF;IAChF,IAAI;QACH,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAED,sDAAsD;IACtD,MAAM;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,IAAY,EAAE,OAAe,EAAE,MAAc;QAC1D,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACvC,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBACrC,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBACtD,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnD,CAAC;QACF,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;CACD;AArCD,kDAqCC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { EmbedBuilder } from "discord.js";
|
|
2
|
+
import type { Locale } from "../i18n";
|
|
3
|
+
/**
|
|
4
|
+
* Port that renders framework-level responses (errors, denials, confirmations)
|
|
5
|
+
* as embeds. The command pipeline depends on this interface, never on a concrete
|
|
6
|
+
* embed module — so a bot can fully restyle/localise feedback by providing its
|
|
7
|
+
* own implementation, with zero changes to the core.
|
|
8
|
+
*
|
|
9
|
+
* Every method receives the locale resolved for the interaction being answered,
|
|
10
|
+
* so titles and fixed copy follow the user's language, not the process's.
|
|
11
|
+
*
|
|
12
|
+
* The default implementation lives in `infrastructure/discord/default-presenter.ts`.
|
|
13
|
+
*/
|
|
14
|
+
export interface Presenter {
|
|
15
|
+
/** A successful, affirmative action. */
|
|
16
|
+
confirmation(message: string, locale: Locale): EmbedBuilder;
|
|
17
|
+
/** A benign business problem (bad input, missing resource, conflict). */
|
|
18
|
+
warning(message: string, locale: Locale): EmbedBuilder;
|
|
19
|
+
/** A serious—but expected—business error. */
|
|
20
|
+
error(message: string, locale: Locale): EmbedBuilder;
|
|
21
|
+
/** An authorization denial from a guard. */
|
|
22
|
+
denial(message: string, locale: Locale): EmbedBuilder;
|
|
23
|
+
/** An unexpected failure, carrying a quotable incident reference. */
|
|
24
|
+
systemError(message: string, reference: string, locale: Locale): EmbedBuilder;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=presenter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presenter.d.ts","sourceRoot":"","sources":["../../src/discord/presenter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IACzB,wCAAwC;IACxC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5D,yEAAyE;IACzE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC;IACvD,6CAA6C;IAC7C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC;IACrD,4CAA4C;IAC5C,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC;IACtD,qEAAqE;IACrE,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC;CAC9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presenter.js","sourceRoot":"","sources":["../../src/discord/presenter.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ContainerBuilder } from "discord.js";
|
|
2
|
+
import { type Button } from "../../discord/interaction/button";
|
|
3
|
+
import type { AnySelectMenuBuilder } from "../../discord/interaction/select-menu";
|
|
4
|
+
/** Discord refuses a message carrying more components than this, container included. */
|
|
5
|
+
export declare const MAX_CARD_COMPONENTS = 40;
|
|
6
|
+
/** Discord's cap on the characters carried by every `TextDisplay` in a message, summed. */
|
|
7
|
+
export declare const MAX_CARD_TEXT_CHARACTERS = 4000;
|
|
8
|
+
/** One image inside a `gallery` block. */
|
|
9
|
+
export interface CardImage {
|
|
10
|
+
/** A URL, `attachment://` included for a file the message itself carries. */
|
|
11
|
+
readonly url: string;
|
|
12
|
+
readonly description?: string;
|
|
13
|
+
readonly spoiler?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The two shapes an `entry` may carry besides its text, plus the bare one with
|
|
17
|
+
* neither.
|
|
18
|
+
*
|
|
19
|
+
* Modelled as a three-way union rather than one shape with two optional
|
|
20
|
+
* fields: Discord's `Section` accepts exactly **one** accessory, so `action`
|
|
21
|
+
* and `thumbnail` together is not a looser version of the block, it is an
|
|
22
|
+
* invalid one. A two-optional-field shape would only catch that at
|
|
23
|
+
* `apply()`, with Discord's own rejection as the first symptom; this union
|
|
24
|
+
* makes the combination fail to compile instead. Each arm carries the other
|
|
25
|
+
* field as `?: never` — without it, TypeScript's leniency on excess
|
|
26
|
+
* properties across a union (a property valid on *any* arm is accepted on
|
|
27
|
+
* all of them) would let both through anyway.
|
|
28
|
+
*/
|
|
29
|
+
export type CardEntryAccessory<S> = {
|
|
30
|
+
readonly action?: never;
|
|
31
|
+
readonly thumbnail?: never;
|
|
32
|
+
} | {
|
|
33
|
+
readonly action: Button<S>;
|
|
34
|
+
readonly thumbnail?: never;
|
|
35
|
+
} | {
|
|
36
|
+
readonly action?: never;
|
|
37
|
+
readonly thumbnail: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* What a compiled select menu must offer for a card to render it — `apply`
|
|
41
|
+
* only, never `onSelect`.
|
|
42
|
+
*
|
|
43
|
+
* `SelectMenu<B, I>` (the DSL's own compiled shape) is contravariant in `I`,
|
|
44
|
+
* so a `SelectMenu<StringSelectMenuBuilder, StringSelectMenuInteraction>` —
|
|
45
|
+
* what `createStringSelect` hands back — is not assignable to a version
|
|
46
|
+
* fixed at the union `AnySelectMenuInteraction`. A card never reads
|
|
47
|
+
* `onSelect` (that is wired separately, through the module's
|
|
48
|
+
* `ComponentRouter`), so this asks for nothing beyond what it actually
|
|
49
|
+
* calls, and every flavour of compiled select menu satisfies it as-is.
|
|
50
|
+
*/
|
|
51
|
+
export interface CardSelectMenu {
|
|
52
|
+
readonly id: string;
|
|
53
|
+
apply(forceDisabled?: boolean): AnySelectMenuBuilder;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* One piece of a card, declared as data rather than built. `createCard`
|
|
57
|
+
* compiles a list of these into a `ContainerBuilder`, the same split
|
|
58
|
+
* `createButton`/`createModal`/`createStringSelect` keep between a
|
|
59
|
+
* definition and the builder it compiles to.
|
|
60
|
+
*/
|
|
61
|
+
export type CardBlock<S> = {
|
|
62
|
+
readonly kind: "text";
|
|
63
|
+
readonly content: string;
|
|
64
|
+
} | ({
|
|
65
|
+
readonly kind: "entry";
|
|
66
|
+
readonly title: string;
|
|
67
|
+
readonly lines?: readonly string[];
|
|
68
|
+
} & CardEntryAccessory<S>) | {
|
|
69
|
+
readonly kind: "controls";
|
|
70
|
+
readonly buttons: readonly Button<S>[];
|
|
71
|
+
} | {
|
|
72
|
+
readonly kind: "select";
|
|
73
|
+
readonly menu: CardSelectMenu;
|
|
74
|
+
} | {
|
|
75
|
+
readonly kind: "separator";
|
|
76
|
+
readonly spacing?: "small" | "large";
|
|
77
|
+
readonly divider?: boolean;
|
|
78
|
+
} | {
|
|
79
|
+
readonly kind: "gallery";
|
|
80
|
+
readonly images: readonly CardImage[];
|
|
81
|
+
};
|
|
82
|
+
export interface CardDef<S> {
|
|
83
|
+
/** The container's left-edge accent colour — see `EMBED_COLORS` for the bot's palette. */
|
|
84
|
+
readonly accent?: number;
|
|
85
|
+
/**
|
|
86
|
+
* The card's content, top to bottom.
|
|
87
|
+
*
|
|
88
|
+
* `null` entries are accepted and skipped: a conditional block is declared
|
|
89
|
+
* in place, at the position it would occupy, rather than assembled into a
|
|
90
|
+
* separate array the caller builds beside this one and has to keep in
|
|
91
|
+
* sync.
|
|
92
|
+
*/
|
|
93
|
+
readonly blocks: readonly (CardBlock<S> | null)[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A compiled card: knows how to render itself for a given state. Mirrors
|
|
97
|
+
* `Button<S>.apply` (`src/core/discord/interaction/button.ts`) on purpose —
|
|
98
|
+
* same parameters, same meaning for `forceDisabled` — which is what lets
|
|
99
|
+
* `disabledControls` neutralise a card exactly the way it neutralises a
|
|
100
|
+
* button row: by applying it a second time with `true`, no special case
|
|
101
|
+
* required.
|
|
102
|
+
*/
|
|
103
|
+
export interface Card<S> {
|
|
104
|
+
apply(state: S, forceDisabled?: boolean): ContainerBuilder;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Declare a card: a definition compiling to a `ContainerBuilder`, the
|
|
108
|
+
* Components V2 analogue of an embed. Follows the same split as
|
|
109
|
+
* `createButton`/`createModal`/`createStringSelect` — data in, a compiled
|
|
110
|
+
* value with an `apply` out — so a caller never touches a V2 builder
|
|
111
|
+
* directly.
|
|
112
|
+
*/
|
|
113
|
+
export declare function createCard<S>(def: CardDef<S>): Card<S>;
|
|
114
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/discord/ui/card.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,gBAAgB,EAQhB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,MAAM,EAAmB,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,2FAA2F;AAC3F,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C,0CAA0C;AAC1C,MAAM,WAAW,SAAS;IACzB,6EAA6E;IAC7E,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAC7B;IAAE,QAAQ,CA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