Skip to content

Tag: telethon

how to delete contact by number telethon

Imports: Code: That code first add an phone_number to our contacts list and after we can easily get their username. After we delete that contact as we just needed their username. But some users don’t have set username so we get username as None. Now how to remove that contact ? Currently I use client(fu…

Running a loop while using telethon

I’m making a telegram channel admin control script that needs checking channel in a loop. I also want some message handlers checking for messages. Here is a part of my code: If i use client.loop.run_until_complete(main()), message handler won’t work but main runs prefectly. and if I use client.run…