Spaces:
Running
Running
from fastapi import FastAPI | |
from core.integrations.telegram_bot import start_bot | |
import asyncio | |
app = FastAPI() | |
async def on_startup(): | |
# Ejecuta el bot como una tarea asincrónica en el mismo event loop | |
asyncio.create_task(start_bot()) | |
async def root(): | |
return {"status": "Bot de Telegram activo"} | |