加入一个全局Client ,方便所有地方调用。

This commit is contained in:
liuwei
2025-04-23 11:24:33 +08:00
parent 04ebb43fe5
commit b7e5a1ff3e
10 changed files with 69 additions and 433 deletions
+2 -1
View File
@@ -151,7 +151,8 @@ class Robot(Job):
# 设置ROBOT功能为启用状态
GroupBotManager.set_group_permission(msg.roomid, Feature.ROBOT, PermissionStatus.ENABLED)
# 更新联系人信息
self.refresh_contacts()
# 如果是加入新群,则拉取群用户信息,并且将群加入联系人
self.client.get_chatroom_info(self.app_id, msg.roomid)
except Exception as e:
self.LOG.error(f"加入新群,自动添加并开启机器人功能 error: {e}")