U
Size: a a a
U
U
U
U
AK
s
f
f
s
f
f
f
@csrf_protect
@require_post
def req_code(request):
phone = request.POST.get('phone')
client = TelegramClient(
session,
api_id,
api_hash,
)
client.connect()
client.send_code_request(phone)
f
f
from telethon.sync import TelegramClient
from threading import Thread
import asyncio
def sync_channels():
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
tg_client = TelegramClient(path, TELEGRAM_API_ID, TELEGRAM_API_HASH, loop=loop)
while True:
try:
me = tg_client.get_me()
except:
pass
thread = Thread(target=sync_channels)
thread.start()
͏С
s
NK
NK
NK