postStory¶
Returns: Story
- class aiogram.methods.post_story.PostStory(*, business_connection_id: str, content: InputStoryContentPhoto | InputStoryContentVideo, active_period: int, caption: str | None = None, parse_mode: str | None = None, caption_entities: list[MessageEntity] | None = None, areas: list[StoryArea] | None = None, post_to_chat_page: bool | None = None, protect_content: bool | None = None, **extra_data: Any)[source]¶
Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns
aiogram.types.story.Story
on success.Source: https://core.telegram.org/bots/api#poststory
- business_connection_id: str¶
Unique identifier of the business connection
- content: InputStoryContentUnion¶
Content of the story
- active_period: int¶
Period after which the story is moved to the archive, in seconds; must be one of
6 * 3600
,12 * 3600
,86400
, or2 * 86400
- caption: str | None¶
Caption of the story, 0-2048 characters after entities parsing
- parse_mode: str | None¶
Mode for parsing entities in the story caption. See formatting options for more details.
- caption_entities: list[MessageEntity] | None¶
A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
- post_to_chat_page: bool | None¶
Pass
True
to keep the story accessible after it expires
- protect_content: bool | None¶
Pass
True
if the content of the story must be protected from forwarding and screenshotting
Usage¶
As bot method¶
result: Story = await bot.post_story(...)
Method as object¶
Imports:
from aiogram.methods.post_story import PostStory
alias:
from aiogram.methods import PostStory
With specific bot¶
result: Story = await bot(PostStory(...))
As reply into Webhook in handler¶
return PostStory(...)