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 += (