InputPaidMediaLivePhoto¶
- class telegram.InputPaidMediaLivePhoto(media, photo, *, api_kwargs=None)[source]¶
Bases:
telegram.InputPaidMediaThe paid media to send is a live photo.
See also
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) – Photo 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.PhotoSizeobject to send.
- type[source]¶
Type of the media, always
'live_photo'.- Type:
- media[source]¶
Video of the live photo to send. Pass a
file_idas String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one. 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.- Type:
- photo[source]¶
Photo of the live photo to send. Pass a
file_idas String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one. 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.- Type: