Added caption paramenter to sendDocument method

This commit is contained in:
Andrea Giove 2016-04-24 17:51:15 +02:00
parent bfbad1625e
commit 87ac962805
No known key found for this signature in database
GPG key ID: 437D8A6C27CF20B4

View file

@ -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