add proxy for tg and fix auth

This commit is contained in:
Yuriy Yuriev
2026-05-14 19:18:44 +07:00
parent 328f510151
commit bdf3fef7ec
7 changed files with 79 additions and 90 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
"""Telegram message utilities."""
import asyncio
import logging
import os
from typing import Optional
@@ -69,7 +70,7 @@ async def send_visit_result(
)
screenshot_path = result.get('screenshot_path')
if screenshot_path and os.path.exists(screenshot_path):
if screenshot_path and await asyncio.to_thread(os.path.exists, screenshot_path):
photo = FSInputFile(screenshot_path)
await bot.send_photo(chat_id=chat_id, photo=photo, caption=text)
else: