diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 01d0be2af..bbb239499 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -3406,6 +3406,19 @@ class ChatProviderTemplate(TypedDict): "platform_specific.telegram.pre_ack_emoji.enable": True, }, }, + "platform_specific.discord.pre_ack_emoji.enable": { + "description": "[Discord] 启用预回应表情", + "type": "bool", + }, + "platform_specific.discord.pre_ack_emoji.emojis": { + "description": "表情列表(Unicode 或自定义表情名)", + "type": "list", + "items": {"type": "string"}, + "hint": "填写 Unicode 表情符号,例如:👍、🤔、⏳", + "condition": { + "platform_specific.discord.pre_ack_emoji.enable": True, + }, + }, }, }, }, diff --git a/astrbot/core/pipeline/preprocess_stage/stage.py b/astrbot/core/pipeline/preprocess_stage/stage.py index 6544f85c1..464f584f8 100644 --- a/astrbot/core/pipeline/preprocess_stage/stage.py +++ b/astrbot/core/pipeline/preprocess_stage/stage.py @@ -27,7 +27,7 @@ async def process( ) -> None | AsyncGenerator[None, None]: """在处理事件之前的预处理""" # 平台特异配置:platform_specific..pre_ack_emoji - supported = {"telegram", "lark"} + supported = {"telegram", "lark", "discord"} platform = event.get_platform_name() cfg = ( self.config.get("platform_specific", {}) diff --git a/dashboard/src/i18n/locales/en-US/features/config-metadata.json b/dashboard/src/i18n/locales/en-US/features/config-metadata.json index eeb0ac805..7c4a668bf 100644 --- a/dashboard/src/i18n/locales/en-US/features/config-metadata.json +++ b/dashboard/src/i18n/locales/en-US/features/config-metadata.json @@ -721,6 +721,17 @@ "hint": "Telegram only supports a fixed reaction set, reference: [https://gist.github.com/Soulter/3f22c8e5f9c7e152e967e8bc28c97fc9](https://gist.github.com/Soulter/3f22c8e5f9c7e152e967e8bc28c97fc9)" } } + }, + "discord": { + "pre_ack_emoji": { + "enable": { + "description": "[Discord] Enable Pre-acknowledgment Emoji" + }, + "emojis": { + "description": "Emoji List (Unicode or Custom Emoji Name)", + "hint": "Enter Unicode emoji symbols, e.g., 👍, 🤔, ⏳" + } + } } } } diff --git a/dashboard/src/i18n/locales/zh-CN/features/config-metadata.json b/dashboard/src/i18n/locales/zh-CN/features/config-metadata.json index 238ad0566..c805fa10b 100644 --- a/dashboard/src/i18n/locales/zh-CN/features/config-metadata.json +++ b/dashboard/src/i18n/locales/zh-CN/features/config-metadata.json @@ -724,6 +724,17 @@ "hint": "Telegram 仅支持固定反应集合,参考:[https://gist.github.com/Soulter/3f22c8e5f9c7e152e967e8bc28c97fc9](https://gist.github.com/Soulter/3f22c8e5f9c7e152e967e8bc28c97fc9)" } } + }, + "discord": { + "pre_ack_emoji": { + "enable": { + "description": "[Discord] 启用预回应表情" + }, + "emojis": { + "description": "表情列表(Unicode 或自定义表情名)", + "hint": "填写 Unicode 表情符号,例如:👍、🤔、⏳" + } + } } } }