Skip to content

Commit 5d811d3

Browse files
JzjerryCopilot
andauthored
fix: Persist Discord pre-ack emoji config across restart by adding missing default key (AstrBotDevs#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>
1 parent 8e6aaee commit 5d811d3

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

astrbot/core/config/default.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@
219219
"telegram": {
220220
"pre_ack_emoji": {"enable": False, "emojis": ["✍️"]},
221221
},
222+
"discord": {
223+
"pre_ack_emoji": {"enable": False, "emojis": ["🤔"]},
224+
},
222225
},
223226
"wake_prefix": ["/"],
224227
"log_level": "INFO",

docs/en/dev/astrbot-config.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ The default AstrBot configuration is as follows:
128128
"telegram": {
129129
"pre_ack_emoji": {"enable": False, "emojis": ["✍️"]},
130130
},
131+
"discord": {
132+
"pre_ack_emoji": {"enable": False, "emojis": ["🤔"]},
133+
},
131134
},
132135
"wake_prefix": ["/"],
133136
"log_level": "INFO",
@@ -511,6 +514,11 @@ When enabled, AstrBot sends a pre-reply emoji before requesting the LLM to infor
511514
- `enable`: Whether to enable pre-reply emojis for Telegram messages. Default is `false`.
512515
- `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).
513516

517+
##### discord
518+
519+
- `enable`: Whether to enable pre-reply emojis for Discord messages. Default is `false`.
520+
- `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).
521+
514522
### `wake_prefix`
515523

516524
Wake prefix. Default is `/`. When a message starts with `/`, AstrBot is awakened.

docs/zh/dev/astrbot-config.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ AstrBot 默认配置如下:
128128
"telegram": {
129129
"pre_ack_emoji": {"enable": False, "emojis": ["✍️"]},
130130
},
131+
"discord": {
132+
"pre_ack_emoji": {"enable": False, "emojis": ["🤔"]},
133+
},
131134
},
132135
"wake_prefix": ["/"],
133136
"log_level": "INFO",
@@ -506,11 +509,16 @@ AstrBot WebUI 配置。
506509
- `enable`: 是否启用飞书消息预回复表情。默认为 `false`
507510
- `emojis`: 预回复的表情列表。默认为 `["Typing"]`。表情枚举名参考:[表情文案说明](https://open.feishu.cn/document/server-docs/im-v1/message-reaction/emojis-introduce)
508511

509-
#### telegram
512+
##### telegram
510513

511514
- `enable`: 是否启用 Telegram 消息预回复表情。默认为 `false`
512515
- `emojis`: 预回复的表情列表。默认为 `["✍️"]`。Telegram 仅支持固定反应集合,参考:[reactions.txt](https://gist.github.com/Soulter/3f22c8e5f9c7e152e967e8bc28c97fc9)
513516

517+
##### discord
518+
519+
- `enable`: 是否启用 Discord 消息预回复表情。默认为 `false`
520+
- `emojis`: 预回复的表情列表。默认为 `["🤔"]`。Discord反应支持参考:[Discord Reaction FAQ](https://support.discord.com/hc/en-us/articles/12102061808663-Reactions-and-Super-Reactions-FAQ)
521+
514522
### `wake_prefix`
515523

516524
唤醒前缀。默认为 `/`。当消息以 `/` 开头时,AstrBot 会被唤醒。

0 commit comments

Comments
 (0)