@@ -339,6 +339,7 @@ def send_photo(self,
339339 reply_to_message_id = None ,
340340 reply_markup = None ,
341341 timeout = 20 ,
342+ parse_mode = None ,
342343 ** kwargs ):
343344 """Use this method to send photos.
344345
@@ -356,6 +357,9 @@ def send_photo(self,
356357 an existing :class:`telegram.PhotoSize` object to send.
357358 caption (:obj:`str`, optional): Photo caption (may also be used when resending photos
358359 by file_id), 0-200 characters.
360+ parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to
361+ show bold, italic, fixed-width text or inline URLs in the media caption. See the
362+ constants in :class:`telegram.ParseMode` for the available modes.
359363 disable_notification (:obj:`bool`, optional): Sends the message silently. Users will
360364 receive a notification with no sound.
361365 reply_to_message_id (:obj:`int`, optional): If the message is a reply, ID of the
@@ -382,6 +386,8 @@ def send_photo(self,
382386
383387 if caption :
384388 data ['caption' ] = caption
389+ if parse_mode :
390+ data ['parse_mode' ] = parse_mode
385391
386392 return url , data
387393
@@ -398,6 +404,7 @@ def send_audio(self,
398404 reply_to_message_id = None ,
399405 reply_markup = None ,
400406 timeout = 20 ,
407+ parse_mode = None ,
401408 ** kwargs ):
402409 """
403410 Use this method to send audio files, if you want Telegram clients to display them in the
@@ -420,6 +427,9 @@ def send_audio(self,
420427 the Internet, or upload a new one using multipart/form-data. Lastly you can pass
421428 an existing :class:`telegram.Audio` object to send.
422429 caption (:obj:`str`, optional): Audio caption, 0-200 characters.
430+ parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to
431+ show bold, italic, fixed-width text or inline URLs in the media caption. See the
432+ constants in :class:`telegram.ParseMode` for the available modes.
423433 duration (:obj:`int`, optional): Duration of sent audio in seconds.
424434 performer (:obj:`str`, optional): Performer.
425435 title (:obj:`str`, optional): Track name.
@@ -455,6 +465,8 @@ def send_audio(self,
455465 data ['title' ] = title
456466 if caption :
457467 data ['caption' ] = caption
468+ if parse_mode :
469+ data ['parse_mode' ] = parse_mode
458470
459471 return url , data
460472
@@ -469,6 +481,7 @@ def send_document(self,
469481 reply_to_message_id = None ,
470482 reply_markup = None ,
471483 timeout = 20 ,
484+ parse_mode = None ,
472485 ** kwargs ):
473486 """Use this method to send general files.
474487
@@ -488,6 +501,9 @@ def send_document(self,
488501 when you send file generated by temp module, for example). Undocumented.
489502 caption (:obj:`str`, optional): Document caption (may also be used when resending
490503 documents by file_id), 0-200 characters.
504+ parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to
505+ show bold, italic, fixed-width text or inline URLs in the media caption. See the
506+ constants in :class:`telegram.ParseMode` for the available modes.
491507 disable_notification (:obj:`bool`, optional): Sends the message silently. Users will
492508 receive a notification with no sound.
493509 reply_to_message_id (:obj:`int`, optional): If the message is a reply, ID of the
@@ -516,6 +532,8 @@ def send_document(self,
516532 data ['filename' ] = filename
517533 if caption :
518534 data ['caption' ] = caption
535+ if parse_mode :
536+ data ['parse_mode' ] = parse_mode
519537
520538 return url , data
521539
@@ -582,6 +600,8 @@ def send_video(self,
582600 timeout = 20 ,
583601 width = None ,
584602 height = None ,
603+ parse_mode = None ,
604+ supports_streaming = None ,
585605 ** kwargs ):
586606 """
587607 Use this method to send video files, Telegram clients support mp4 videos
@@ -604,6 +624,11 @@ def send_video(self,
604624 height (:obj:`int`, optional): Video height.
605625 caption (:obj:`str`, optional): Video caption (may also be used when resending videos
606626 by file_id), 0-200 characters.
627+ parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to
628+ show bold, italic, fixed-width text or inline URLs in the media caption. See the
629+ constants in :class:`telegram.ParseMode` for the available modes.
630+ supports_streaming (:obj:`bool`, optional): Pass True, if the uploaded video is
631+ suitable for streaming.
607632 disable_notification (:obj:`bool`, optional): Sends the message silently. Users will
608633 receive a notification with no sound.
609634 reply_to_message_id (:obj:`int`, optional): If the message is a reply, ID of the
@@ -632,6 +657,10 @@ def send_video(self,
632657 data ['duration' ] = duration
633658 if caption :
634659 data ['caption' ] = caption
660+ if parse_mode :
661+ data ['parse_mode' ] = parse_mode
662+ if supports_streaming :
663+ data ['supports_streaming' ] = supports_streaming
635664 if width :
636665 data ['width' ] = width
637666 if height :
@@ -650,6 +679,7 @@ def send_voice(self,
650679 reply_to_message_id = None ,
651680 reply_markup = None ,
652681 timeout = 20 ,
682+ parse_mode = None ,
653683 ** kwargs ):
654684 """
655685 Use this method to send audio files, if you want Telegram clients to display the file
@@ -669,6 +699,9 @@ def send_voice(self,
669699 the Internet, or upload a new one using multipart/form-data. Lastly you can pass
670700 an existing :class:`telegram.Voice` object to send.
671701 caption (:obj:`str`, optional): Voice message caption, 0-200 characters.
702+ parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to
703+ show bold, italic, fixed-width text or inline URLs in the media caption. See the
704+ constants in :class:`telegram.ParseMode` for the available modes.
672705 duration (:obj:`int`, optional): Duration of the voice message in seconds.
673706 disable_notification (:obj:`bool`, optional): Sends the message silently. Users will
674707 receive a notification with no sound.
@@ -698,6 +731,8 @@ def send_voice(self,
698731 data ['duration' ] = duration
699732 if caption :
700733 data ['caption' ] = caption
734+ if parse_mode :
735+ data ['parse_mode' ] = parse_mode
701736
702737 return url , data
703738
@@ -1504,6 +1539,8 @@ def edit_message_text(self,
15041539 parse_mode (:obj:`str`): Send Markdown or HTML, if you want Telegram apps to show bold,
15051540 italic, fixed-width text or inline URLs in your bot's message. See the constants in
15061541 :class:`telegram.ParseMode` for the available modes.
1542+ disable_web_page_preview (:obj:`bool`, optional): Disables link previews for links in
1543+ this message.
15071544 reply_markup (:class:`telegram.ReplyMarkup`, optional): Additional interface options. A
15081545 JSON-serialized object for an inline keyboard, custom reply keyboard, instructions
15091546 to remove reply keyboard or to force a reply from the user.
@@ -1546,6 +1583,7 @@ def edit_message_caption(self,
15461583 caption = None ,
15471584 reply_markup = None ,
15481585 timeout = None ,
1586+ parse_mode = None ,
15491587 ** kwargs ):
15501588 """
15511589 Use this method to edit captions of messages sent by the bot or via the bot
@@ -1559,6 +1597,9 @@ def edit_message_caption(self,
15591597 inline_message_id (:obj:`str`, optional): Required if chat_id and message_id are not
15601598 specified. Identifier of the inline message.
15611599 caption (:obj:`str`, optional): New caption of the message.
1600+ parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to
1601+ show bold, italic, fixed-width text or inline URLs in the media caption. See the
1602+ constants in :class:`telegram.ParseMode` for the available modes.
15621603 reply_markup (:class:`telegram.ReplyMarkup`, optional): Additional interface options. A
15631604 JSON-serialized object for an inline keyboard, custom reply keyboard, instructions
15641605 to remove reply keyboard or to force a reply from the user.
@@ -1586,6 +1627,8 @@ def edit_message_caption(self,
15861627
15871628 if caption :
15881629 data ['caption' ] = caption
1630+ if parse_mode :
1631+ data ['parse_mode' ] = parse_mode
15891632 if chat_id :
15901633 data ['chat_id' ] = chat_id
15911634 if message_id :
0 commit comments