Story

class pyrogram.types.Story

This object represents a story.

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

  • chat (:obj:`~pyrogram.types.Chat`) – Identifier of the chat that posted the story.

  • date (:py:obj:`~datetime.datetime`, *optional*) – Date the story was published.

  • expire_date (:py:obj:`~datetime.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 (:obj:`~pyrogram.types.StoryRepostInfo`, *optional*) – Information about the original story; may be None if the story wasn’t reposted.

  • privacy_settings (:obj:`~pyrogram.types.StoryPrivacySettings`, *optional*) – Privacy rules affecting story visibility; may be approximate for non-owned stories.

  • media (:obj:`~pyrogram.enums.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 (:obj:`~pyrogram.types.Photo`, *optional*) – Story is a photo, information about the photo.

  • video (:obj:`~pyrogram.types.Video`, *optional*) – Story is a video, information about the video.

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

  • caption_entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*) – For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the caption.

  • areas (List of :obj:`~pyrogram.types.StoryArea`, *optional*) – Clickable areas to be shown on the story content.

  • has_protected_content (``bool``, *optional*) – True, if the story can’t be forwarded as a message or reposted as a story.

  • reactions (List of :obj:`~pyrogram.types.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.

  • album_ids (List of ``int``) – Identifiers of story albums to which the story is added; only for manageable stories.

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