From 5d811d394922feec37e445d8a60f55f69fe8b725 Mon Sep 17 00:00:00 2001 From: JIANG Zijun Date: Wed, 11 Mar 2026 16:41:08 +0800 Subject: [PATCH] fix: Persist Discord pre-ack emoji config across restart by adding missing default key (#6031) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial plan * fix: add discord default platform_specific pre-ack config Co-authored-by: Jzjerry <20167827+Jzjerry@users.noreply.github.com> * Delete tests/unit/test_config.py we don't need to add tests * fix: use 🤔 as default discord pre-ack emoji Co-authored-by: Jzjerry <20167827+Jzjerry@users.noreply.github.com> * add back old test config * doc: discord pre-ack-emoji doc --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Jzjerry <20167827+Jzjerry@users.noreply.github.com> --- astrbot/core/config/default.py | 3 +++ docs/en/dev/astrbot-config.md | 8 ++++++++ docs/zh/dev/astrbot-config.md | 10 +++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 2e32073a9..ba656ff53 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -219,6 +219,9 @@ DEFAULT_CONFIG = { "telegram": { "pre_ack_emoji": {"enable": False, "emojis": ["✍️"]}, }, + "discord": { + "pre_ack_emoji": {"enable": False, "emojis": ["🤔"]}, + }, }, "wake_prefix": ["/"], "log_level": "INFO", diff --git a/docs/en/dev/astrbot-config.md b/docs/en/dev/astrbot-config.md index 5c5d356f5..6a735eb12 100644 --- a/docs/en/dev/astrbot-config.md +++ b/docs/en/dev/astrbot-config.md @@ -128,6 +128,9 @@ The default AstrBot configuration is as follows: "telegram": { "pre_ack_emoji": {"enable": False, "emojis": ["✍️"]}, }, + "discord": { + "pre_ack_emoji": {"enable": False, "emojis": ["🤔"]}, + }, }, "wake_prefix": ["/"], "log_level": "INFO", @@ -511,6 +514,11 @@ When enabled, AstrBot sends a pre-reply emoji before requesting the LLM to infor - `enable`: Whether to enable pre-reply emojis for Telegram messages. Default is `false`. - `emojis`: List of pre-reply emojis. Default is `["✍️"]`. Telegram only supports a fixed set of reactions; refer to [reactions.txt](https://gist.github.com/Soulter/3f22c8e5f9c7e152e967e8bc28c97fc9). +##### discord + +- `enable`: Whether to enable pre-reply emojis for Discord messages. Default is `false`. +- `emojis`: List of pre-reply emojis. Default is `["🤔"]`. Refer to [Discord Reaction FAQ](https://support.discord.com/hc/en-us/articles/12102061808663-Reactions-and-Super-Reactions-FAQ). + ### `wake_prefix` Wake prefix. Default is `/`. When a message starts with `/`, AstrBot is awakened. diff --git a/docs/zh/dev/astrbot-config.md b/docs/zh/dev/astrbot-config.md index b6b7edd27..ca9752ded 100644 --- a/docs/zh/dev/astrbot-config.md +++ b/docs/zh/dev/astrbot-config.md @@ -128,6 +128,9 @@ AstrBot 默认配置如下: "telegram": { "pre_ack_emoji": {"enable": False, "emojis": ["✍️"]}, }, + "discord": { + "pre_ack_emoji": {"enable": False, "emojis": ["🤔"]}, + }, }, "wake_prefix": ["/"], "log_level": "INFO", @@ -506,11 +509,16 @@ AstrBot WebUI 配置。 - `enable`: 是否启用飞书消息预回复表情。默认为 `false`。 - `emojis`: 预回复的表情列表。默认为 `["Typing"]`。表情枚举名参考:[表情文案说明](https://open.feishu.cn/document/server-docs/im-v1/message-reaction/emojis-introduce) -#### telegram +##### telegram - `enable`: 是否启用 Telegram 消息预回复表情。默认为 `false`。 - `emojis`: 预回复的表情列表。默认为 `["✍️"]`。Telegram 仅支持固定反应集合,参考:[reactions.txt](https://gist.github.com/Soulter/3f22c8e5f9c7e152e967e8bc28c97fc9) +##### discord + +- `enable`: 是否启用 Discord 消息预回复表情。默认为 `false`。 +- `emojis`: 预回复的表情列表。默认为 `["🤔"]`。Discord反应支持参考:[Discord Reaction FAQ](https://support.discord.com/hc/en-us/articles/12102061808663-Reactions-and-Super-Reactions-FAQ) + ### `wake_prefix` 唤醒前缀。默认为 `/`。当消息以 `/` 开头时,AstrBot 会被唤醒。