editStory()
Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
business_connection_id | string | required | Unique identifier of the business connection |
story_id | number | required | Unique identifier of the story to edit |
content | InputStoryContent | required | Content of the story |
caption | string | optional | Caption of the story, 0-2048 characters after entities parsing |
parse_mode | string | optional | Mode for parsing entities in the story caption. See formatting options for more details. |
caption_entities | MessageEntity[] | optional | A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode |
areas | StoryArea[] | optional | A JSON-serialized list of clickable areas to be shown on the story |
returns
usage in yaebal
editStory is directly typed on Api — call it straight off bot.api.
import type { EditStoryParams } from "@yaebal/types";
await bot.api.editStory({
business_connection_id: "...",
story_id: 1,
content: {} /* InputStoryContent */,
} satisfies EditStoryParams);context shortcut
also available as ctx.editStory() on
4
context types — see @yaebal/contexts.
/** Edits a story previously posted by the bot on behalf of a managed business account. Requires the *can\_manage\_stories* business bot right. Returns [Story](https://core.telegram.org/bots/api/#story) on success. */
ctx.editStory(params: Omit<EditStoryParams, "business_connection_id"> & { business_connection_id?: string })official Bot API docs: https://core.telegram.org/bots/api/#editstory