调整代码结构
This commit is contained in:
16
robot.py
16
robot.py
@@ -373,6 +373,14 @@ class Robot(Job):
|
||||
self.contact_manager.update_contact(msg.sender, nickName[0])
|
||||
self.send_text_msg(f"Hi {nickName[0]},我自动通过了你的好友请求。", msg.sender)
|
||||
|
||||
# 添加一个方法用于刷新联系人信息
|
||||
def refresh_contacts(self):
|
||||
"""刷新联系人信息"""
|
||||
self.allContacts = self.get_all_contacts()
|
||||
self.all_head_img = self.get_all_head_img_url()
|
||||
self.contact_manager.refresh_contacts(self.allContacts,self.all_head_img, self.wcf)
|
||||
self.LOG.info("联系人信息已刷新")
|
||||
|
||||
def send_group_txt_message(self, msg: str, feature: Feature):
|
||||
try:
|
||||
receivers = self.gbm.get_group_list()
|
||||
@@ -530,11 +538,3 @@ class Robot(Job):
|
||||
self.wcf.send_file(pub_path, "45317011307@chatroom")
|
||||
except Exception as e:
|
||||
self.LOG.error(f"xiu_ren_pdf_send error:{e}")
|
||||
|
||||
# 添加一个方法用于刷新联系人信息
|
||||
def refresh_contacts(self):
|
||||
"""刷新联系人信息"""
|
||||
self.allContacts = self.get_all_contacts()
|
||||
self.all_head_img = self.get_all_head_img_url()
|
||||
self.contact_manager.refresh_contacts(self.allContacts,self.all_head_img, self.wcf)
|
||||
self.LOG.info("联系人信息已刷新")
|
||||
|
||||
Reference in New Issue
Block a user