2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-22 18:07:21 +00:00
pyrogram/docs/source/start/examples/get_chat_members.rst

22 lines
402 B
ReStructuredText
Raw Normal View History

get_chat_members
================
This example shows how to get all the members of a chat.
.. code-block:: python
from pyrogram import Client
2022-04-24 11:56:07 +02:00
# Target channel/supergroup
TARGET = -100123456789
app = Client("my_account")
2022-04-24 11:56:07 +02:00
async def main():
async with app:
async for member in app.get_chat_members(TARGET):
print(member)
app.run(main())