major refactor (untested)

This commit is contained in:
Aron Petau 2025-12-27 11:59:04 +01:00
parent a29412b4da
commit a77a0c0393
22 changed files with 1037 additions and 24 deletions

23
main.py Normal file
View file

@ -0,0 +1,23 @@
import asyncio
from playwright.async_api import async_playwright
from application_handler import ApplicationHandler
from telegram_bot import TelegramBot
async def main():
async with async_playwright() as p:
browser = await p.chromium.launch(headless=True)
context = await browser.new_context()
# Initialize the application
app_handler = ApplicationHandler(context)
bot = TelegramBot(app_handler)
bot.start()
# Keep the bot running
try:
await asyncio.Event().wait()
except (KeyboardInterrupt, SystemExit):
print("Shutting down...")
if __name__ == "__main__":
asyncio.run(main())