mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-19 15:43:24 +01:00
Added caption paramenter to sendDocument method
This commit is contained in:
parent
bfbad1625e
commit
87ac962805
1 changed files with 6 additions and 0 deletions
|
@ -421,6 +421,7 @@ class Bot(TelegramObject):
|
|||
chat_id,
|
||||
document,
|
||||
filename=None,
|
||||
caption=None
|
||||
**kwargs):
|
||||
"""Use this method to send general files.
|
||||
|
||||
|
@ -434,6 +435,9 @@ class Bot(TelegramObject):
|
|||
filename:
|
||||
File name that shows in telegram message (it is usefull when you
|
||||
send file generated by temp module, for example). [Optional]
|
||||
caption:
|
||||
Document caption (may also be used when resending documents by
|
||||
file_id), 0-200 characters. [Optional]
|
||||
|
||||
Keyword Args:
|
||||
disable_notification (Optional[bool]): Sends the message silently.
|
||||
|
@ -468,6 +472,8 @@ class Bot(TelegramObject):
|
|||
|
||||
if filename:
|
||||
data['filename'] = filename
|
||||
if caption:
|
||||
data['caption'] = caption
|
||||
|
||||
return url, data
|
||||
|
||||
|
|
Loading…
Reference in a new issue