Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from telethon import TelegramClient
- api_id = '********'
- api_hash = '***************'
- client = TelegramClient('my_account', api_id, api_hash)
- chtid = -************
- clean_usernames = []
- async def getter():
- participants = await client.get_participants(chtid)
- print(participants)
- #for user in participants:
- # if user.id is not None:
- # clean_usernames.append(user.id)
- #print(clean_usernames)
- with client:
- client.loop.run_until_complete(getter())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement