From 16bed092fc07f48452130e19a9e53bfeff5ddc1a Mon Sep 17 00:00:00 2001 From: Untone Date: Sat, 28 Sep 2024 11:09:23 +0300 Subject: [PATCH] normalized-log-fix6 --- bot/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/api.py b/bot/api.py index aaadfe0..919b420 100644 --- a/bot/api.py +++ b/bot/api.py @@ -9,6 +9,7 @@ import logging logger = logging.getLogger("bot.api") api_base = f"https://api.telegram.org/bot{BOT_TOKEN}/" +file_api_base = f"https://api.telegram.org/file/bot{BOT_TOKEN}/" async def telegram_api(endpoint: str, json_data=None, **kwargs): @@ -43,7 +44,7 @@ async def download_file(file_id): file_path = file["result"]["file_path"] sep = '' if file_path.startswith('/') else '/' # Construct the correct download URL - download_url = f"{api_base}{sep}{file_path}" + download_url = f"{file_api_base}{sep}{file_path}" async with aiohttp.ClientSession() as session: async with session.get(download_url) as response: