Using Pyrogram I am trying to get the id of users who are chat members, but the get_chat_members
function does not return all users, about 5-10 depending on the selected group, although there are many more in the chat. How do I get all users?
from pyrogram import Client
# Target supergroup
TARGET = "id"
app = Client("my_account", api_id=api_id, api_hash=api_hash)
async def main():
async with app:
async for member in app.get_chat_members(TARGET):
print(member.user.id)
app.run(main())
I tried to use the iter_chat_members
method from an older version of pyrogram, but the result is the same