InputPaidMediaPhoto¶
- class telegram.InputPaidMediaPhoto(media, *, api_kwargs=None)[source]¶
Bases:
telegram.InputPaidMediaThe paid media to send is a photo.
See also
Added in version 21.4.
- Parameters:
media (
str| file object |InputFile|bytes|pathlib.Path|telegram.PhotoSize) – File to send. Pass afile_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. Lastly you can pass an existingtelegram.PhotoSizeobject to send.
- media[source]¶
Photo to send.
- Type:
str|telegram.InputFile