Story#

class pyrogram.types.Story#

This object represents a story.

Parameters:
  • chat (Chat) – Chat that posted the story.

  • id (int) – Unique identifier for the story in the chat.

  • date (datetime, optional) – Date the story was sent.

  • expire_date (datetime, optional) – Date the story will be expired.

  • media (MessageMediaType, optional) – The media type of the Story. This field will contain the enumeration type of the media message. You can use media = getattr(story, story.media.value) to access the media message.

  • has_protected_content (bool, optional) – True, if the story can’t be forwarded.

  • photo (Photo, optional) – Story is a photo, information about the photo.

  • video (Video, optional) – Story is a video, information about the video.

  • edited (bool, optional) – True, if the Story has been edited.

  • pinned (bool, optional) – True, if the Story is pinned.

  • caption (str, optional) – Caption for the Story, 0-1024 characters.

  • caption_entities (List of MessageEntity, optional) – For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the caption.

  • views (int, optional) – Stories views.

  • forwards (int, optional) – Stories forwards.

  • reactions (List of Reaction) – List of the reactions to this story.

  • skipped (bool, optional) – The story is skipped. A story can be skipped in case it was skipped.

  • deleted (bool, optional) – The story is deleted. A story can be deleted in case it was deleted or you tried to retrieve a story that doesn’t exist yet.

  • link (str, property) – Generate a link to this story, only for Telegram Premium chats having usernames. Can be None if the story cannot have a link.