repostStory()
Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
business_connection_id | string | required | Unique identifier of the business connection |
from_chat_id | number | required | Unique identifier of the chat which posted the story that should be reposted |
from_story_id | number | required | Unique identifier of the story that should be reposted |
active_period | number | required | Period after which the story is moved to the archive, in seconds; must be one of 6 3600, 12 3600, 86400, or 2 * 86400 |
post_to_chat_page | boolean | optional | Pass True to keep the story accessible after it expires |
protect_content | boolean | optional | Pass True if the content of the story must be protected from forwarding and screenshotting |
returns
usage in yaebal
repostStory is directly typed on Api — call it straight off bot.api.
import type { RepostStoryParams } from "@yaebal/types";
await bot.api.repostStory({
business_connection_id: "...",
from_chat_id: 123456789,
from_story_id: 1,
active_period: 1,
} satisfies RepostStoryParams);context shortcut
also available as ctx.repostStory() on
3
context types — see @yaebal/contexts.
/** Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the *can\_manage\_stories* business bot right for both business accounts. Returns [Story](https://core.telegram.org/bots/api/#story) on success. */
ctx.repostStory(params: Omit<RepostStoryParams, "business_connection_id" | "from_chat_id"> & { business_connection_id?: string })official Bot API docs: https://core.telegram.org/bots/api/#repoststory