Merge pull request #253 from aadeg/master

Added caption paramenter to sendDocument method
This commit is contained in:
Jannes Höke 2016-04-24 18:01:43 +02:00
commit 94e35d5b1c

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