mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-14 02:52:12 +00:00
Fix send_file method for requests without files. (For e.g. setWebhook)
This commit is contained in:
parent
412684e7b5
commit
b2798e39a8
1 changed files with 3 additions and 1 deletions
|
|
@ -151,7 +151,9 @@ class BaseBot:
|
|||
:param payload: request payload
|
||||
:return: resonse
|
||||
"""
|
||||
if isinstance(file, str):
|
||||
if file is None:
|
||||
files = {}
|
||||
elif isinstance(file, str):
|
||||
# You can use file ID or URL in the most of requests
|
||||
payload[file_type] = file
|
||||
files = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue