alo брат врат братан баран фикс ошибка файл не вошёл или вошёл
This commit is contained in:
1 parent
daa2015f7d
commit
cc618cc649
1 file changed
+3
-13
@@ -237,14 +237,8 @@ async def guest_middleware(handler, event, data):
|
|||||||
|
|
||||||
prompt = f"<файл>{file_content}</файл>{prompt}"
|
prompt = f"<файл>{file_content}</файл>{prompt}"
|
||||||
|
|
||||||
except UnicodeDecodeError:
|
except Exception as e:
|
||||||
await mans(message, "файл не вошёл брат❌❌")
|
print(f"{YELLOW} -- {e}{RESET}")
|
||||||
return
|
|
||||||
|
|
||||||
except Exception:
|
|
||||||
if msg:
|
|
||||||
await msg.edit_text(message, "файл не вошёл ало ошибка❌❌")
|
|
||||||
return
|
|
||||||
|
|
||||||
if replied and replied.document:
|
if replied and replied.document:
|
||||||
file_bytes = io.BytesIO()
|
file_bytes = io.BytesIO()
|
||||||
@@ -257,12 +251,8 @@ async def guest_middleware(handler, event, data):
|
|||||||
file_content = file_bytes.read().decode("utf-8", errors="ignore")
|
file_content = file_bytes.read().decode("utf-8", errors="ignore")
|
||||||
file_bytes.close()
|
file_bytes.close()
|
||||||
prompt = f"<файл>{file_content}</файл>{prompt}"
|
prompt = f"<файл>{file_content}</файл>{prompt}"
|
||||||
except UnicodeDecodeError:
|
|
||||||
await mans(message, "файл не вошёл❌")
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"{RED} -- {e}{RESET}")
|
print(f"{YELLOW} -- {e}{RESET}")
|
||||||
return
|
|
||||||
|
|
||||||
if location:
|
if location:
|
||||||
prompt += (
|
prompt += (
|
||||||
|
|||||||
Reference in new issue
Block a user