From cd19e89528c49d8b2b02addbd0d2b52ef4ba4dd8 Mon Sep 17 00:00:00 2001 From: minecraft1024a Date: Fri, 12 Sep 2025 20:47:52 +0800 Subject: [PATCH] =?UTF-8?q?refactor(config):=20=E7=A7=BB=E9=99=A4=E7=9D=A1?= =?UTF-8?q?=E5=89=8D=E6=B6=88=E6=81=AF=E7=BE=A4=E7=BB=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除了 `pre_sleep_notification_groups` 配置项,因为该功能已通过新的插件事件和动作机制实现,不再需要硬编码的群组列表。现在可以通过插件来灵活地处理睡前通知的发送逻辑。 --- src/config/official_configs.py | 3 --- template/bot_config_template.toml | 2 -- 2 files changed, 5 deletions(-) diff --git a/src/config/official_configs.py b/src/config/official_configs.py index 9253c92cb..f6fc4b3c6 100644 --- a/src/config/official_configs.py +++ b/src/config/official_configs.py @@ -662,9 +662,6 @@ class SleepSystemConfig(ValidatedConfigBase): ) max_sleep_delay_minutes: int = Field(default=60, description="单日最大延迟入睡分钟数") enable_pre_sleep_notification: bool = Field(default=True, description="是否启用睡前消息") - pre_sleep_notification_groups: List[str] = Field( - default_factory=list, description='接收睡前消息的群号列表, 格式: ["platform:group_id1", "platform:group_id2"]' - ) pre_sleep_prompt: str = Field( default="我准备睡觉了,请生成一句简短自然的晚安问候。", description="用于生成睡前消息的提示" ) diff --git a/template/bot_config_template.toml b/template/bot_config_template.toml index ebc2f0f38..5472dfd73 100644 --- a/template/bot_config_template.toml +++ b/template/bot_config_template.toml @@ -484,8 +484,6 @@ max_sleep_delay_minutes = 60 # 是否在进入“准备入睡”状态时发送一条消息通知。 enable_pre_sleep_notification = false -# 接收睡前消息的群组列表。格式为: ["platform:group_id1", "platform:group_id2"],例如 ["qq:12345678"] -pre_sleep_notification_groups = [] # 用于生成睡前消息的提示。AI会根据这个提示生成一句晚安问候。 pre_sleep_prompt = "我准备睡觉了,请生成一句简短自然的晚安问候。" insomnia_duration_minutes = [30, 60] # 单次失眠状态的持续时间范围(分钟)