lets get this party starteddddd (#1287)

This commit is contained in:
NotSoToothless
2026-05-30 08:45:32 -07:00
committed by GitHub
parent bd3871ef20
commit 7edc0202f4
8 changed files with 892 additions and 2 deletions
+6
View File
@@ -30,6 +30,7 @@ from dotenv import load_dotenv
from websockets.asyncio.client import connect as wsconnect
from BOT.storage import insert_match, insert_player_games
from BOT.autologging import process_game as autolog_process_game
_HERE = Path(__file__).resolve().parent
load_dotenv(dotenv_path=_HERE / ".env")
@@ -172,6 +173,11 @@ async def _handle_game(game: Dict[str, Any]) -> None:
log.info("Stored game %s in DB", sid)
except Exception as exc:
log.error("DB insert failed for %s: %s", sid, exc)
# Autolog match/dispatch (no-ops in standalone mode where no bot is set).
try:
await autolog_process_game(game)
except Exception as exc:
log.error("autolog failed for %s: %s", sid, exc)
print(json.dumps(game, indent=2, ensure_ascii=False))
print("-" * 80)