i am finding it difficult figuring out all the groups that i have admin privileges in so that i can add my bot. there are about 300 groups. is there any user level api or a 3rd party api to achieve this?
Asked
Active
Viewed 194 times
1 Answers
0
In Telethon, you can check whether you have admin rights or not by this code:
client = TelegramClient("session", API_ID, API_HASH)
await client.connect()
dialogs = await client.get_dialogs()
for dialog in dialogs:
if not isinstance(dialog.entity, User):
if dialog.entity.admin_rights is not None:
print(dialog.entity.admin_rights)

Megasrx
- 116
- 5
-
this definitely is from ChatGPT – Aven Desta Apr 25 '23 at 15:14
-
1No, this code was part of my Telethon project. Are there any errors? – Megasrx Apr 25 '23 at 17:16