Open xin0501 opened 2 years ago
使用contact.is_friend(),提取Contact.find_all()返回结果中的机器人好友,结果不完全正确。很多是机器人好友的联系人会被检测为不是机器人的好友。 Reproduce your problem
使用contact.is_friend(),提取Contact.find_all()返回结果中的机器人好友,结果不完全正确。很多是机器人好友的联系人会被检测为不是机器人的好友。
测试代码
contacts = await self.bot.Contact.find_all() for contact in contacts: # await contact.say(text[2:]) if contact.is_friend(): await from_contact.say(f"此账号为微信好友:{contact.name}") else: await from_contact.say(f"此账号不是微信好友:{contact.name}")
很多好友,我已经双向确认过了,确实是机器人的好友,但是实际返回的结果为,此账号不是微信好友。不知道我哪里做的不对。
The info of contact is fetched from server of puppet servicer, so if there is wrong info, python-wechaty can do nothing but puppet servicer, eg: @padlocal .
requirements
Describe your problem
测试代码
Your experiments