From d44817e2a8dee3283186f4059e6d30a2abc19e11 Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Sun, 30 Mar 2025 23:45:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=96=B0=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/chat/bot.py | 6 +----- template/bot_config_template.toml | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/plugins/chat/bot.py b/src/plugins/chat/bot.py index 78456f56b..0a074c644 100644 --- a/src/plugins/chat/bot.py +++ b/src/plugins/chat/bot.py @@ -122,11 +122,7 @@ class ChatBot: # 神秘的消息流数据结构处理 if chat.group_info: - if chat.group_info.group_name: - mes_name_dict = chat.group_info.group_name - mes_name = mes_name_dict.get("group_name", "无名群聊") - else: - mes_name = "群聊" + mes_name = chat.group_info.group_name else: mes_name = "私聊" diff --git a/template/bot_config_template.toml b/template/bot_config_template.toml index 3973a87fa..8a84f09b1 100644 --- a/template/bot_config_template.toml +++ b/template/bot_config_template.toml @@ -50,7 +50,7 @@ schedule_doing_update_interval = 900 # 日程表更新间隔 单位秒 schedule_temperature = 0.5 # 日程表温度,建议0.5-1.0 [platforms] # 必填项目,填写每个平台适配器提供的链接 -qq="http://127.0.0.1:18002/api/message" +nonebot-qq="http://127.0.0.1:18002/api/message" [heartflow] # 注意:可能会消耗大量token,请谨慎开启 enable = false