From cc618cc649a09ee6733a45ba7914c8178746afc7 Mon Sep 17 00:00:00 2001 From: huker667 Date: Mon, 10 Aug 2026 18:14:41 +0300 Subject: [PATCH] =?UTF-8?q?alo=20=D0=B1=D1=80=D0=B0=D1=82=20=D0=B2=D1=80?= =?UTF-8?q?=D0=B0=D1=82=20=D0=B1=D1=80=D0=B0=D1=82=D0=B0=D0=BD=20=D0=B1?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D0=BD=20=D1=84=D0=B8=D0=BA=D1=81=20=D0=BE?= =?UTF-8?q?=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20=D1=84=D0=B0=D0=B9=D0=BB=20?= =?UTF-8?q?=D0=BD=D0=B5=20=D0=B2=D0=BE=D1=88=D1=91=D0=BB=20=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=B2=D0=BE=D1=88=D1=91=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/main.py b/main.py index 290525e..23b6829 100644 --- a/main.py +++ b/main.py @@ -237,15 +237,9 @@ async def guest_middleware(handler, event, data): prompt = f"<файл>{file_content}{prompt}" - except UnicodeDecodeError: - await mans(message, "файл не вошёл брат❌❌") - return - - except Exception: - if msg: - await msg.edit_text(message, "файл не вошёл ало ошибка❌❌") - return - + except Exception as e: + print(f"{YELLOW} -- {e}{RESET}") + if replied and replied.document: file_bytes = io.BytesIO() try: @@ -257,12 +251,8 @@ async def guest_middleware(handler, event, data): file_content = file_bytes.read().decode("utf-8", errors="ignore") file_bytes.close() prompt = f"<файл>{file_content}{prompt}" - except UnicodeDecodeError: - await mans(message, "файл не вошёл❌") - return except Exception as e: - print(f"{RED} -- {e}{RESET}") - return + print(f"{YELLOW} -- {e}{RESET}") if location: prompt += (