Add setup.py
This commit is contained in:
parent
7303cad968
commit
b9a01a2345
13
setup.py
Normal file
13
setup.py
Normal 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()
|
Loading…
x
Reference in New Issue
Block a user