diff --git a/notificacion_telegram.py b/notificacion_telegram.py index c1a8c5c..981ca09 100644 --- a/notificacion_telegram.py +++ b/notificacion_telegram.py @@ -22,8 +22,13 @@ async def enviar_mensaje(mensaje): # Crear una instancia del bot bot = Bot(token=TOKEN) - # Enviar el mensaje al grupo - await bot.send_message(chat_id=GRUPO_ALERTAS_ID, text=mensaje) + # Enviar el mensaje al grupo con formato HTML + await bot.send_message( + chat_id=GRUPO_ALERTAS_ID, + text=mensaje, + parse_mode="HTML" # Indicar que el mensaje usa formato HTML + ) + logger.info(f"Mensaje enviado al grupo de guardias: {mensaje}") except Exception as e: logger.error(f"Error al enviar el mensaje: {e}")