edit_story()¶
- Client.edit_story()¶
Edit story.
Usable by Users Bots
- Parameters:¶
story_id (
int
) – Unique identifier (int) of the target story.chat_id (
int
, optional) – Unique identifier (int) of the target channel. You can also use channel public link in form of t.me/<username> (str).animation (
str
|BinaryIO
, optional) – New story Animation. Pass a file_id as string to send a animation that exists on the Telegram servers, pass an HTTP URL as a string for Telegram to get a animation from the Internet, pass a file path as string to upload a new animation that exists on your local machine, or pass a binary file-like object with its attribute “.name” set for in-memory uploads.photo (
str
|BinaryIO
, optional) – New story photo. Pass a file_id as string to send a photo that exists on the Telegram servers, pass an HTTP URL as a string for Telegram to get a photo from the Internet, pass a file path as string to upload a new photo that exists on your local machine, or pass a binary file-like object with its attribute “.name” set for in-memory uploads.video (
str
|BinaryIO
, optional) – New story video. Pass a file_id as string to send a video that exists on the Telegram servers, pass an HTTP URL as a string for Telegram to get a video from the Internet, pass a file path as string to upload a new video that exists on your local machine, or pass a binary file-like object with its attribute “.name” set for in-memory uploads.privacy (
StoriesPrivacyRules
, optional) – Story privacy.allowed_users (List of
int
, optional) – List of user_id whos allowed to view the story.denied_users (List of
int
, optional) – List of user_id whos denied to view the story.caption (
str
, optional) – Story caption, 0-1024 characters.parse_mode (
ParseMode
, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.caption_entities (List of
MessageEntity
) – List of special entities that appear in the caption, which can be specified instead of parse_mode.media_areas (List of
InputMediaArea
) – List of media area object to be included in story.
- Returns:¶
Story
a single story is returned.
Example
# Edit story photo photo_id = "abcd12345" await app.edit_story(story_id=1, photo=photo_id)
- Raises:¶
ValueError – In case of invalid arguments.