From b30fa2a121b2906f7770cc6672e6cbdbb2811908 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:11:04 +0000 Subject: [PATCH 1/3] Initial plan From 17e79f5ad576d6a974bc7e6df48eee23ca0e202b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:13:56 +0000 Subject: [PATCH 2/3] feat: add Discord pre-ack emoji support Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com> --- astrbot/core/config/default.py | 13 +++++++++++++ astrbot/core/pipeline/preprocess_stage/stage.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) 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", {}) From 1776b1dc5d7af4dd59a016a21f18b858570b4e43 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Mon, 2 Mar 2026 14:35:31 +0800 Subject: [PATCH 3/3] feat: add Discord pre-acknowledgment emoji configuration in English and Chinese locales --- .../i18n/locales/en-US/features/config-metadata.json | 11 +++++++++++ .../i18n/locales/zh-CN/features/config-metadata.json | 11 +++++++++++ 2 files changed, 22 insertions(+) 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 表情符号,例如:👍、🤔、⏳" + } + } } } }