06-sep: [menu] cancelar reabre el menu + traza de edits fallidos
This commit is contained in:
@@ -340,13 +340,16 @@ def teclado_cancelar():
|
||||
def _enviar_edit(chat_id, message_id, texto, teclado):
|
||||
import requests
|
||||
try:
|
||||
requests.post(_api("editMessageText"), data={
|
||||
r = requests.post(_api("editMessageText"), data={
|
||||
"chat_id": chat_id,
|
||||
"message_id": message_id,
|
||||
"text": texto,
|
||||
"parse_mode": "HTML",
|
||||
"reply_markup": json.dumps(teclado),
|
||||
}, timeout=10)
|
||||
d = r.json()
|
||||
if not d.get("ok"):
|
||||
_log(f"edit {message_id} fallo: {d.get('description')}")
|
||||
except Exception as e:
|
||||
_log(f"edit error: {e}")
|
||||
|
||||
@@ -610,6 +613,7 @@ def procesar_callback(data, chat_id, message_id):
|
||||
if ruta == "cancelar":
|
||||
_limpiar_pendiente(chat_id)
|
||||
_borrar(chat_id, message_id)
|
||||
_reenviar_menu(chat_id)
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user