fix: Persist Discord pre-ack emoji config across restart by adding missing default key (#6031)

* 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>
This commit is contained in:
JIANG Zijun
2026-03-11 16:41:08 +08:00
committed by GitHub
parent 8e6aaee10c
commit 5d811d3949
3 changed files with 20 additions and 1 deletions
+3
View File
@@ -219,6 +219,9 @@ DEFAULT_CONFIG = {
"telegram": { "telegram": {
"pre_ack_emoji": {"enable": False, "emojis": ["✍️"]}, "pre_ack_emoji": {"enable": False, "emojis": ["✍️"]},
}, },
"discord": {
"pre_ack_emoji": {"enable": False, "emojis": ["🤔"]},
},
}, },
"wake_prefix": ["/"], "wake_prefix": ["/"],
"log_level": "INFO", "log_level": "INFO",
+8
View File
@@ -128,6 +128,9 @@ The default AstrBot configuration is as follows:
"telegram": { "telegram": {
"pre_ack_emoji": {"enable": False, "emojis": ["✍️"]}, "pre_ack_emoji": {"enable": False, "emojis": ["✍️"]},
}, },
"discord": {
"pre_ack_emoji": {"enable": False, "emojis": ["🤔"]},
},
}, },
"wake_prefix": ["/"], "wake_prefix": ["/"],
"log_level": "INFO", "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`. - `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). - `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`
Wake prefix. Default is `/`. When a message starts with `/`, AstrBot is awakened. Wake prefix. Default is `/`. When a message starts with `/`, AstrBot is awakened.
+9 -1
View File
@@ -128,6 +128,9 @@ AstrBot 默认配置如下:
"telegram": { "telegram": {
"pre_ack_emoji": {"enable": False, "emojis": ["✍️"]}, "pre_ack_emoji": {"enable": False, "emojis": ["✍️"]},
}, },
"discord": {
"pre_ack_emoji": {"enable": False, "emojis": ["🤔"]},
},
}, },
"wake_prefix": ["/"], "wake_prefix": ["/"],
"log_level": "INFO", "log_level": "INFO",
@@ -506,11 +509,16 @@ AstrBot WebUI 配置。
- `enable`: 是否启用飞书消息预回复表情。默认为 `false` - `enable`: 是否启用飞书消息预回复表情。默认为 `false`
- `emojis`: 预回复的表情列表。默认为 `["Typing"]`。表情枚举名参考:[表情文案说明](https://open.feishu.cn/document/server-docs/im-v1/message-reaction/emojis-introduce) - `emojis`: 预回复的表情列表。默认为 `["Typing"]`。表情枚举名参考:[表情文案说明](https://open.feishu.cn/document/server-docs/im-v1/message-reaction/emojis-introduce)
#### telegram ##### telegram
- `enable`: 是否启用 Telegram 消息预回复表情。默认为 `false` - `enable`: 是否启用 Telegram 消息预回复表情。默认为 `false`
- `emojis`: 预回复的表情列表。默认为 `["✍️"]`。Telegram 仅支持固定反应集合,参考:[reactions.txt](https://gist.github.com/Soulter/3f22c8e5f9c7e152e967e8bc28c97fc9) - `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` ### `wake_prefix`
唤醒前缀。默认为 `/`。当消息以 `/` 开头时,AstrBot 会被唤醒。 唤醒前缀。默认为 `/`。当消息以 `/` 开头时,AstrBot 会被唤醒。