Skip to content
Back to top
View this page

# Story

class telegram.Story(chat, id, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object represents a story.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `chat` and `id` are equal.

  Available In

  - `telegram.ExternalReplyInfo.story`

  - `telegram.Message.effective_attachment`

  - `telegram.Message.reply_to_story`

  - `telegram.Message.story`

  Returned In

  - `telegram.Bot.edit_story()`

  - `telegram.Bot.post_story()`

  - `telegram.Bot.repost_story()`

  Added in version 20.5.

  Changed in version 21.0: Added attributes `chat` and `id` and equality based on them.

  Parameters:

    - chat (`telegram.Chat`) – Chat that posted the story.

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

  chat

    Chat that posted the story.

    Type:

      `telegram.Chat`

  id

    Unique identifier for the story in the chat.

    Type:

      `int`

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.

  async repost(business_connection_id, active_period, post_to_chat_page=None, protect_content=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

         await bot.repost_story(
            from_chat_id=story.chat.id,
            from_story_id=story.id,
            *args, **kwargs
        )

    For the documentation of the arguments, please see `telegram.Bot.repost_story()`.

    Added in version 22.6.

    Returns:

      On success, `Story` is returned.

    Return type:

      `Story`