diff --git a/vps_opencode_bot/opencode_bot.py b/vps_opencode_bot/opencode_bot.py index 951845b..3db5baa 100644 --- a/vps_opencode_bot/opencode_bot.py +++ b/vps_opencode_bot/opencode_bot.py @@ -122,7 +122,7 @@ def enviar(chat_id, texto, parse="HTML"): _registrar(chat_id, tg("sendMessage", {"chat_id": chat_id, "text": texto[i:i + 3900], "parse_mode": parse})) - time.sleep(0.3) + time.sleep(0.1) def enviar_doc(chat_id, ruta, caption=None): @@ -424,7 +424,7 @@ def procesar_texto(chat, texto): comienzo = time.time() terminado = False while time.time() - comienzo < 900: - time.sleep(2) + time.sleep(1) code, hist = oc_get(f"/session/{sid}/message?limit=10") if code == 200 and isinstance(hist, list): for item in reversed(hist[-10:]): @@ -444,7 +444,7 @@ def procesar_texto(chat, texto): transcurrido = time.time() - comienzo if (code2 == 200 and isinstance(sts, dict) and sts.get(sid, {}).get("type") != "busy" - and transcurrido >= 5): + and transcurrido >= 2): terminado = True break