Files
talia_bot/talia_bot/data/flows/crew_propose_activity.json
google-labs-jules[bot] 384e23cf58 fix: resolve unresponsive bot by migrating to FlowEngine
The Telegram bot was becoming unresponsive due to a conflict between a legacy `ConversationHandler` for the `propose_activity` flow and the main `FlowEngine`. This was likely caused by breaking changes in the `python-telegram-bot` library.

This commit resolves the issue by:
1.  Removing the problematic `ConversationHandler` from `main.py` and its related functions from `modules/equipo.py`.
2.  Migrating the "propose activity" feature to a data-driven JSON flow (`crew_propose_activity.json`), making it compatible with the existing `FlowEngine`.
3.  Pinning the `python-telegram-bot` dependency to `<22` in `requirements.txt` to prevent future breakage from upstream updates.

This change ensures all conversational flows are handled consistently by the `FlowEngine`, restoring bot responsiveness and improving maintainability.
2025-12-21 18:07:45 +00:00

30 lines
1.2 KiB
JSON

{
"id": "crew_propose_activity",
"description": "Permite a un miembro del equipo proponer una actividad para aprobación.",
"trigger_button": "propose_activity",
"user_roles": ["crew"],
"steps": [
{
"step_id": "get_description",
"question": "Por favor, describe la actividad que quieres proponer.",
"input_type": "text",
"next_step": "get_duration"
},
{
"step_id": "get_duration",
"question": "Entendido. Ahora, por favor, indica la duración estimada en horas (ej. 2, 4.5).",
"input_type": "text",
"next_step": "confirm_proposal"
},
{
"step_id": "confirm_proposal",
"question": "Gracias. Se ha enviado la siguiente propuesta para aprobación:\n\n📝 *Actividad:* {get_description}\n⏳ *Duración:* {get_duration} horas\n\nRecibirás una notificación cuando sea revisada.",
"input_type": "static"
}
],
"completion_action": {
"action_type": "notify_admin",
"message_template": "Nueva propuesta de actividad:\n\nDescripción: {get_description}\nDuración: {get_duration} horas"
}
}