Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/substitutions/global.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

.. |chat_id_group| replace:: Unique identifier for the target chat or username of the target supergroup (in the format ``@supergroupusername``).

.. |parse_mode| replace:: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. See the constants in :class:`telegram.constants.ParseMode` for the available modes.
.. |parse_mode| replace:: Mode for parsing entities. See :class:`telegram.constants.ParseMode` and `formatting options <https://core.telegram.org/bots/api#formatting-options>`__ for more details.

.. |allow_sending_without_reply| replace:: Pass :obj:`True`, if the message should be sent even if the specified replied-to message is not found.

Expand Down
48 changes: 12 additions & 36 deletions telegram/_files/inputmedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,8 @@ class InputMedia(TelegramObject):
caption (:obj:`str`, optional): Caption of the media to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities
parsing.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
parse_mode (:obj:`str`, optional): |parse_mode|

Attributes:
type (:obj:`str`): Type of the input media.
Expand Down Expand Up @@ -127,12 +123,8 @@ class InputMediaAnimation(InputMedia):
caption (:obj:`str`, optional): Caption of the animation to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
after entities parsing.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
width (:obj:`int`, optional): Animation width.
height (:obj:`int`, optional): Animation height.
duration (:obj:`int`, optional): Animation duration in seconds.
Expand Down Expand Up @@ -209,12 +201,8 @@ class InputMediaPhoto(InputMedia):
caption (:obj:`str`, optional ): Caption of the photo to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
entities parsing.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|

Attributes:
type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.PHOTO`.
Expand Down Expand Up @@ -277,12 +265,8 @@ class InputMediaVideo(InputMedia):
caption (:obj:`str`, optional): Caption of the video to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
entities parsing.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
width (:obj:`int`, optional): Video width.
height (:obj:`int`, optional): Video height.
duration (:obj:`int`, optional): Video duration in seconds.
Expand Down Expand Up @@ -376,12 +360,8 @@ class InputMediaAudio(InputMedia):
caption (:obj:`str`, optional): Caption of the audio to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
entities parsing.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
duration (:obj:`int`): Duration of the audio in seconds as defined by sender.
performer (:obj:`str`, optional): Performer of the audio as defined by sender or by audio
tags.
Expand Down Expand Up @@ -465,12 +445,8 @@ class InputMediaDocument(InputMedia):
caption (:obj:`str`, optional): Caption of the document to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
entities parsing.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
thumb (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \
optional): |thumbdocstringnopath|

Expand Down
2 changes: 1 addition & 1 deletion telegram/_inline/inlinequery.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class InlineQuery(TelegramObject):
offset (:obj:`str`): Offset of the results to be returned, can be controlled by the bot.
location (:class:`telegram.Location`): Optional. Sender location, only for bots that
request user location.
chat_type (:obj:`str`, optional): Type of the chat, from which the inline query was sent.
chat_type (:obj:`str`): Optional. Type of the chat, from which the inline query was sent.

.. versionadded:: 13.5

Expand Down
16 changes: 4 additions & 12 deletions telegram/_inline/inlinequeryresultaudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,8 @@ class InlineQueryResultAudio(InlineQueryResult):
caption (:obj:`str`, optional): Caption,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities
parsing.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached
to the message.
input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the
Expand All @@ -67,12 +63,8 @@ class InlineQueryResultAudio(InlineQueryResult):
caption (:obj:`str`): Optional. Caption,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities
parsing.
parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`): Optional. |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. |caption_entities|
reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached
to the message.
input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the
Expand Down
16 changes: 4 additions & 12 deletions telegram/_inline/inlinequeryresultcachedaudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,8 @@ class InlineQueryResultCachedAudio(InlineQueryResult):
caption (:obj:`str`, optional): Caption,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities
parsing.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached
to the message.
input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the
Expand All @@ -61,12 +57,8 @@ class InlineQueryResultCachedAudio(InlineQueryResult):
caption (:obj:`str`): Optional. Caption,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities
parsing.
parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optionals): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. |caption_entities|
reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached
to the message.
input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the
Expand Down
16 changes: 4 additions & 12 deletions telegram/_inline/inlinequeryresultcacheddocument.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,8 @@ class InlineQueryResultCachedDocument(InlineQueryResult):
caption (:obj:`str`, optional): Caption of the document to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
after entities parsing.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption.. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached
to the message.
input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the
Expand All @@ -65,12 +61,8 @@ class InlineQueryResultCachedDocument(InlineQueryResult):
caption (:obj:`str`): Optional. Caption of the document to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
after entities parsing.
parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption.. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`): Optional. |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. |caption_entities|
reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached
to the message.
input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the
Expand Down
16 changes: 4 additions & 12 deletions telegram/_inline/inlinequeryresultcachedgif.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,8 @@ class InlineQueryResultCachedGif(InlineQueryResult):
caption (:obj:`str`, optional): Caption of the GIF file to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
after entities parsing.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached
to the message.
input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the
Expand All @@ -64,12 +60,8 @@ class InlineQueryResultCachedGif(InlineQueryResult):
caption (:obj:`str`): Optional. Caption of the GIF file to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
after entities parsing.
parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`): Optional. |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. |caption_entities|
reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached
to the message.
input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the
Expand Down
16 changes: 4 additions & 12 deletions telegram/_inline/inlinequeryresultcachedmpeg4gif.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,8 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
caption (:obj:`str`, optional): Caption of the MPEG-4 file to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
after entities parsing.
parse_mode (:obj:`str`, optional): Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`, optional): |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`], optional): |caption_entities|
reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached
to the message.
input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the
Expand All @@ -64,12 +60,8 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
caption (:obj:`str`): Optional. Caption of the MPEG-4 file to be sent,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
after entities parsing.
parse_mode (:obj:`str`): Optional. Send Markdown or HTML, if you want Telegram apps to show
bold, italic, fixed-width text or inline URLs in the media caption. See the constants
in :class:`telegram.constants.ParseMode` for the available modes.
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special
entities that appear in the caption, which can be specified instead of
:paramref:`parse_mode`.
parse_mode (:obj:`str`): Optional. |parse_mode|
caption_entities (List[:class:`telegram.MessageEntity`]): Optional. |caption_entities|
reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached
to the message.
input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the
Expand Down
Loading