Skip to content

Commit

Permalink
shortened download url
Browse files Browse the repository at this point in the history
  • Loading branch information
drui9 committed Jul 5, 2024
1 parent 139e454 commit 4c9a19c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions autogram/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import requests
from abc import ABC
from typing import Any
from loguru import logger
from . import chat_actions
from threading import Lock
from requests.models import Response
Expand Down Expand Up @@ -86,7 +85,7 @@ def getUpdates(self, **kwargs) -> Response:

def downloadFile(self, file_path: str) -> Response:
"""Downloads a file with file_path got from getFile(...)"""
url = f'https://api.telegram.org/file/bot{self.settings("telegram-token")}/{file_path}'
url = f'{self.endpoint}file/bot{self.settings("telegram-token")}/{file_path}'
return self.requests.get(url)

def getFile(self, file_id: str) -> Response:
Expand Down

0 comments on commit 4c9a19c

Please sign in to comment.