1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Generated by `codegen_payloads`, do not edit by hand.
use serde::Serialize;
use crate::types::{
BusinessConnectionId, InputStoryContent, MessageEntity, ParseMode, Seconds, Story, StoryArea,
};
impl_payload! {
/// Posts a story on behalf of a managed business account. Requires the _can_manage_stories_ business bot right. Returns [`Story`] on success.
///
/// [`Story`]: crate::types::Story
#[derive(Debug, Clone, Serialize)]
pub PostStory (PostStorySetters) => Story {
required {
/// Unique identifier of the business connection
pub business_connection_id: BusinessConnectionId,
/// Content of the story
pub content: InputStoryContent,
/// Period after which the story is moved to the archive, in seconds; must be one of `6 * 3600`, `12 * 3600`, `86400`, or `2 * 86400`
pub active_period: Seconds,
}
optional {
/// Caption of the story, 0-2048 characters after entities parsing
pub caption: String [into],
/// Mode for parsing entities in the story caption. See [formatting options] for more details
///
/// [formatting options]: https://core.telegram.org/bots/api#formatting-options
pub parse_mode: ParseMode,
/// List of special entities that appear in the caption, which can be specified instead of _parse_mode_
pub caption_entities: Vec<MessageEntity> [collect],
/// List of clickable areas to be shown on the story
pub areas: Vec<StoryArea> [collect],
/// Pass _true_ to keep the story accessible after it expires
pub post_to_chat_page: bool,
/// Pass _true_ if the content of the story must be protected from forwarding and screenshotting
pub protect_content: bool,
}
}
}