Story#

class pyrogram.types.Story#

This object represents a story.

Parameters:
  • id (int) – Unique story identifier among stories of the given sender.

  • chat (Chat) – Identifier of the chat that posted the story.

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

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

  • is_edited (bool, optional) – True, if the story was edited.

  • is_posted_to_chat_page (bool, optional) – True, if the story is saved in the sender’s profile and will be available there after expiration

  • is_visible_only_for_self (bool, optional) – True, if the story is visible only for the current user.

  • repost_info (StoryRepostInfo, optional) – Information about the original story; may be None if the story wasn’t reposted.

  • privacy_settings (StoryPrivacySettings, optional) – Privacy rules affecting story visibility; may be approximate for non-owned stories.

  • 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.

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

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

  • 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.

  • areas (List of StoryArea, optional) – Clickable areas to be shown on the story content.

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

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

  • views (int, optional) – Stories views.

  • forwards (int, optional) – Stories forwards.

  • 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.