This commit is contained in:
@@ -48,3 +48,13 @@ app.state.agent_graphs: dict = {}
|
||||
# Routers
|
||||
# ---------------------------------------------------------------------------
|
||||
app.include_router(v1_router, prefix="/v1")
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Discord bot — launched once on app startup (not at import time, which
|
||||
# would double-fire under uvicorn --reload).
|
||||
# ---------------------------------------------------------------------------
|
||||
@app.on_event("startup")
|
||||
async def _start_discord_bot() -> None:
|
||||
from bot.discord_bot import start_in_background # noqa: E402
|
||||
|
||||
start_in_background()
|
||||
Reference in New Issue
Block a user