去除无效代码

This commit is contained in:
liuwei
2025-05-28 16:23:28 +08:00
parent 51e69650bb
commit 60543bedc7
2 changed files with 0 additions and 29 deletions

View File

@@ -454,13 +454,6 @@ class Robot:
while True:
time.sleep(1)
# 添加一个方法用于刷新联系人信息
async def refresh_contacts(self):
"""刷新联系人信息"""
self.allContacts = self.get_all_contacts()
friends = await self.ipad_bot.get_contract_list()
self.contact_manager.refresh_contacts(self.allContacts, friends)
self.LOG.info("联系人信息已刷新")
async def send_group_txt_message(self, msg: str, feature: Feature):
"""向所有启用了特定功能的群发送文本消息"""

View File

@@ -257,28 +257,6 @@ class ContactManager:
self._personal_contacts[wxid] = nickname
self._logger.debug(f"已更新联系人: {wxid} -> {nickname}")
def refresh_contacts(self, new_contacts: Dict[str, str], friends: List[str]) -> None:
"""刷新联系人信息
Args:
new_contacts: 新的联系人字典
friends: 联系人信息,格式为 ["wxid","wxid2"]
"""
self._contacts = new_contacts
self._friends = friends
# friends: 好友清单 contact = {
# "wxid": cnt.get("wxid", ""),
# "code": cnt.get("code", ""),
# "remark": cnt.get("remark", ""),
# "name": cnt.get("name", ""),
# "country": cnt.get("country", ""),
# "province": cnt.get("province", ""),
# "city": cnt.get("city", ""),
# "gender": gender}
self._logger.info(f"联系人信息已刷新,共 {len(new_contacts)} 个联系人")
self._classify_contacts()
def get_contact_statistics(self) -> Tuple[int, int, int, int, int]:
"""获取联系人统计信息