From baf5d845c16e1445099e042a53c34d14c0a63012 Mon Sep 17 00:00:00 2001 From: HibiKier <775757368@qq.com> Date: Wed, 22 Jan 2025 15:02:04 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E7=BE=A4=E7=BB=84?= =?UTF-8?q?=E8=B8=A2=E5=87=BA=E7=94=A8=E6=88=B7=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/qq/group_handle/data_source.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/zhenxun/builtin_plugins/platform/qq/group_handle/data_source.py b/zhenxun/builtin_plugins/platform/qq/group_handle/data_source.py index 5e307536..d713b929 100644 --- a/zhenxun/builtin_plugins/platform/qq/group_handle/data_source.py +++ b/zhenxun/builtin_plugins/platform/qq/group_handle/data_source.py @@ -316,10 +316,13 @@ class GroupManager: group_id=group_id, ) if sub_type == "kick": - operator = await bot.get_group_member_info( - user_id=int(operator_id), group_id=int(group_id) - ) - operator_name = operator["card"] or operator["nickname"] + if operator_id != "0": + operator = await bot.get_group_member_info( + user_id=int(operator_id), group_id=int(group_id) + ) + operator_name = operator["card"] or operator["nickname"] + else: + operator_name = "" return f"{user_name} 被 {operator_name} 送走了." elif sub_type == "leave": return f"{user_name}离开了我们..."