|
|
@ -362,6 +362,13 @@ async def main() -> None: |
|
|
|
bots.append(bot) |
|
|
|
await bot.login() |
|
|
|
print("gather") |
|
|
|
if sys.version_info[0] == 3 and sys.version_info[1] < 11: |
|
|
|
tasks = [] |
|
|
|
for bot in bots: |
|
|
|
task = asyncio.create_task(bot.client.sync_forever(timeout=30000, full_state=True)) |
|
|
|
tasks.append(task) |
|
|
|
await asyncio.gather(*tasks) |
|
|
|
else: |
|
|
|
async with asyncio.TaskGroup() as tg: |
|
|
|
for bot in bots: |
|
|
|
task = tg.create_task(bot.client.sync_forever(timeout=30000, full_state=True)) |
|
|
|