normalized-log-fix6
This commit is contained in:
parent
a066446c96
commit
16bed092fc
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user