MTPyroger/examples/get_chat_members.py

11 lines
271 B
Python
Raw Normal View History

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