InputMediaLivePhoto¶
- class telegram.InputMediaLivePhoto(media, photo, caption=None, parse_mode=None, caption_entities=None, show_caption_above_media=None, has_spoiler=None, *, api_kwargs=None)[source]¶
Bases:
telegram.InputMediaRepresents a live photo to be sent.
See also
Available In
Added in version 22.8.
- Parameters:
media (
str| file object |InputFile|bytes|pathlib.Path|Video) – Video of the live photo to send. Pass afile_idto send a file that exists on the Telegram servers (recommended). To upload a file, you can either pass a file object (e.g.open("filename", "rb")) or the file contents as bytes. If the bot is running inlocal_mode, passing the path of the file (as string orpathlib.Pathobject) is supported as well. Sending live photos by a URL is currently unsupported. Lastly you can pass an existingtelegram.Videoobject to send.photo (
str| file object |InputFile|bytes|pathlib.Path|PhotoSize) – The static photo to send. Pass afile_idto send a file that exists on the Telegram servers (recommended). To upload a file, you can either pass a file object (e.g.open("filename", "rb")) or the file contents as bytes. If the bot is running inlocal_mode, passing the path of the file (as string orpathlib.Pathobject) is supported as well. Sending live photos by a URL is currently unsupported. Lastly you can pass an existingtelegram.PhotoSizeobject to send.caption (
str, optional) – Caption of the live photo to be sent, 0-1024characters after entities parsing.parse_mode (
str, optional) – Mode for parsing entities. Seetelegram.constants.ParseModeand formatting options for more details.caption_entities (Sequence[
telegram.MessageEntity], optional) – Sequence of special entities that appear in the caption, which can be specified instead ofparse_mode.show_caption_above_media (
bool, optional) – PassTrue, if the caption must be shown above the message media.has_spoiler (
bool, optional) – PassTrue, if the video needs to be covered with a spoiler animation.
- caption[source]¶
Optional. Caption of the live photo to be sent, 0-
1024characters after entities parsing.- Type:
- parse_mode[source]¶
Optional. Mode for parsing entities. See
telegram.constants.ParseModeand formatting options for more details.- Type:
- caption_entities[source]¶
Optional. Tuple of special entities that appear in the caption, which can be specified instead of
parse_mode.- Type:
tuple[
telegram.MessageEntity]