fix: Correct syntax errors and add error handling in task command

main
brobert (aider) 3 months ago
parent 6ac396e79f
commit ccd72146cd

@ -77,8 +77,12 @@ export function handleTaskCommand(body: string, sender: string, groupId: string,
return;
}
completeTask(parseInt(taskId));
completeTask(taskId);
sendMessage(sender, `✅ Tarea ${taskId} completada: ${task.description}`);
} catch (error) {
console.error('Error completing task:', error);
sendMessage(sender, `❌ Error al completar tarea: ${error.message}`);
}
} else if (action === 'mostrar' || !action) {
// Handle /tarea or /tarea mostrar
const user = `@${sender.split('@')[0]}`; // Default to the sender

Loading…
Cancel
Save