add proxy for tg and fix auth
This commit is contained in:
+2
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user