Single part at the root, COMPOSE_FILE in .env

This commit is contained in:
hh
2026-09-08 20:38:54 +02:00
parent 321e4b6b35
commit aac037676c
86 changed files with 68 additions and 27 deletions
@@ -0,0 +1,21 @@
import asyncio
import anyio
from userbot import PyroClient
async def main() -> None:
sessions_dir = anyio.Path("sessions")
await sessions_dir.mkdir(parents=True, exist_ok=True)
client = PyroClient("generated", workdir=".", load_handlers=False)
await client.start()
user_id = client.me.id if client.me else "unknown"
await client.stop()
await anyio.Path("generated.session").rename(sessions_dir / f"{user_id}.session")
if __name__ == "__main__":
asyncio.run(main())