Add setup.py

This commit is contained in:
Michael De Roover 2021-12-06 04:46:52 +01:00
parent 7303cad968
commit b9a01a2345
Signed by: vim
GPG Key ID: 075496E232CE04CB

13
setup.py Normal file
View File

@ -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()