INNER CODE UNIT · Python
run
GHJJ123/brainrotguard · main.py:124
async def run(self) -> None:
"""Start everything."""
self.running = True
await self.setup()
# Start Telegram bot
if self.bot:
await self.bot.start()
# Start FastAPI via uvicorn
uvi_level = logging.getLogger().getEffectiveLevel()
config = uvicorn.Config(
fastapi_app,
host=self.config.web.host,
port=self.config.web.port,
log_level=logging.getLevelName(uvi_level).lower(),
)
server = uvicorn.Server(config)