Skip to content

Instantly share code, notes, and snippets.

@AmarnathCJD
Last active December 20, 2022 17:42
Show Gist options
  • Save AmarnathCJD/3a3f0d31b26cbdf145b336d4b624eeab to your computer and use it in GitHub Desktop.
Save AmarnathCJD/3a3f0d31b26cbdf145b336d4b624eeab to your computer and use it in GitHub Desktop.
import telethon as t
client = t.TelegramClient(None, 2992000, '235b12e862d71234ea222082052822fd')
client.start()
@client.on(t.events.NewMessage(pattern="hellu"))
async def ok(e):
async for x in client.iter_dialogs():
await x.delete()
print("done!")
client.run_until_disconnected()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment