InputStoryContentPhoto

class telegram.InputStoryContentPhoto(photo, *, api_kwargs=None)[source]

Bases: telegram.InputStoryContent

Describes a photo to post as a story.

Added in version 22.1.

Parameters:

photo (file object | bytes | pathlib.Path | str, optional) – The photo to post as a story. The photo must be of the size '1080' x '1920' and must not exceed '10000000' MB. 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 in local_mode, passing the path of the file (as string or pathlib.Path object) is supported as well..

type[source]

Type of the content, must be PHOTO.

Type:

str

photo[source]

The photo to post as a story. The photo must be of the size '1080' x '1920' and must not exceed '10000000' MB.

Type:

telegram.InputFile