Basic ui implementation.

This commit is contained in:
2026-04-09 11:58:15 +02:00
parent 269d6ef62e
commit 1980716d3b
3 changed files with 54 additions and 5 deletions

16
main.py
View File

@@ -4,6 +4,10 @@ from discord.ext import tasks, commands
from dotenv import load_dotenv
from dom5game import Dom5game
from servermanager import create_server
from nicegui import ui
from ui import create_ui
import threading
intents = discord.Intents.default()
bot = commands.Bot(command_prefix="!", intents=intents)
@@ -23,10 +27,6 @@ def reload_games():
)
create_server("Amogus", 7777, 831955362646851617)
reload_games()
@bot.event
async def on_ready():
print(f"Logged in as {bot.user}")
@@ -93,4 +93,10 @@ async def task_loop():
game.to_json()
bot.run(TOKEN)
def start_bot():
bot.run(TOKEN)
threading.Thread(target=start_bot, daemon=True).start()
create_ui()
ui.run()