complete restructure

This commit is contained in:
2026-08-19 13:16:43 -04:00
parent d7b6f28cbd
commit f87e1d51ef
60 changed files with 8176 additions and 5143 deletions
+24
View File
@@ -0,0 +1,24 @@
"""Shared App holder for the command modules, wired by each group's register."""
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from vibe_bot.app import App
_app: App | None = None
def set_app(app: App) -> None:
"""Store the App so command handlers can reach the services."""
global _app
_app = app
def require_app() -> App:
"""The App wired by build_bot(); handlers must not run before it."""
if _app is None:
msg = "App is not initialized; build_bot(app) must be called first."
raise RuntimeError(msg)
return _app