修改输出

pull/65/head
foxplaying 2025-10-16 04:46:54 +08:00 committed by GitHub
parent dcc8881846
commit 95104d2c20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -295,19 +295,23 @@ class NoticeHandler:
elif user_id == self_id:
if sub_type == "leave":
text = "(你)退出了群"
logger.info(f"{group_id} Bot退出了群")
elif sub_type == "kick":
text = f"(你)被 {operator_name} 移出"
logger.info(f"{group_id} Bot被 {operator_id} 移出")
else:
text = f"(你)离开群(方式: {sub_type}"
logger.info(f"{group_id} Bot{text.replace('(你)', '')}")
logger.info(f"{group_id} Bot离开群(方式: {sub_type}")
else:
if sub_type == "leave":
text = f"退出了群"
logger.info(f"{group_id} 用户 {user_id} {text}")
elif sub_type == "kick":
text = f"{operator_name} 移出"
logger.info(f"{group_id} 用户 {user_id}{operator_id} 移出")
else:
text = f"离开群(方式: {sub_type}"
logger.info(f"{group_id} 用户 {user_id} {text}")
logger.info(f"{group_id} 用户 {user_id} {text}")
handled_message = Seg(type="text", data=text)
user_info = UserInfo(
platform=global_config.maibot_server.platform_name,