0

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?

Spidy
  • 556
  • 5
  • 11

1 Answers1

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