Python 3.6 compatibility fix

This commit is contained in:
Alfonso E.M 2020-11-07 15:12:17 +01:00
parent 81009e61d4
commit 560abdfa8c

View file

@ -122,8 +122,9 @@ with TelegramClient(getSession(), api_id, api_hash,
async def start():
tasks = []
loop = asyncio.get_event_loop()
for i in range(worker_count):
task = asyncio.create_task(worker())
task = loop.create_task(worker())
tasks.append(task)
await sendHelloMessage(client, peerChannel)
await client.run_until_disconnected()