2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-23 18:37:26 +00:00
pyrogram/examples/chat_members.py

11 lines
271 B
Python
Raw Normal View History

2019-01-07 10:33:09 +01:00
"""This example shows how to get all the members of a chat."""
from pyrogram import Client
2019-04-13 16:02:31 +02:00
app = Client("my_account")
2019-01-07 10:33:09 +01:00
target = "pyrogramchat" # Target channel/supergroup
with app:
for member in app.iter_chat_members(target):
print(member.user.first_name)