edit_story()

Client.edit_story()

Edit a story.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat. For your own stories you can use “me” or “self”.

  • story_id (int) – The ID of the story to edit.

  • caption (str, optional) – New caption for the story, 0-2048 characters.

  • parse_mode (ParseMode, optional) – By default, texts are parsed using HTML style.

  • caption_entities (List of MessageEntity, optional) – List of special entities that appear in the new caption.

  • privacy_rules (List of InputPrivacyRule, optional) – New privacy rules for the story.

Returns:

StoryItem – On success, the edited story is returned.

Example

# Edit story caption
await app.edit_story("me", 12345, caption="Updated caption!")