wechaty / python-wechaty

Python Wechaty is a Conversational RPA SDK for Chatbot Makers written in Python
https://wechaty.readthedocs.io/zh_CN/latest/
Apache License 2.0
1.62k stars 234 forks source link

请问如何实现可以实时的获取到某个群的所有成员呀?能否简单的提供一下代码,谢谢🙏 #379

Open ghost opened 1 year ago

ghost commented 1 year ago

如下代码好像并不能实时的获取某个特定群的用户,请问需要做哪些修改呢?

        await room.ready()
        members = await room.member_list()
        for member in members:
            await member.ready()
        print(member)
wj-Mcat commented 1 year ago

@padlocal In my bot account, there are some history rooms and contacts in the server when start the bot. I know there are some dirty methods, but there is no dirty event to trigger. So, How to refresh the info when start the bot ?