mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-24 15:59:18 +00:00
22 lines
402 B
ReStructuredText
22 lines
402 B
ReStructuredText
get_chat_members
|
|
================
|
|
|
|
This example shows how to get all the members of a chat.
|
|
|
|
.. code-block:: python
|
|
|
|
from pyrogram import Client
|
|
|
|
# Target channel/supergroup
|
|
TARGET = -100123456789
|
|
|
|
app = Client("my_account")
|
|
|
|
|
|
async def main():
|
|
async with app:
|
|
async for member in app.get_chat_members(TARGET):
|
|
print(member)
|
|
|
|
|
|
app.run(main()) |