diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..7670034 --- /dev/null +++ b/setup.py @@ -0,0 +1,13 @@ +#!/usr/bin/python3 +from telethon.sync import TelegramClient +from config import * + +from telethon.tl.types import User + +with TelegramClient('telelog', api_id, api_hash) as client: + for dialog in client.iter_dialogs(): + entity = dialog.entity + if isinstance(entity, User): + f = open(f'logs/{dialog.id}', "a") + f.write("Message history for " + str(dialog.id) + ":\n") + f.close()