List of all members | Public Fields | Public Types | Public Instance Methods | Static Public Attributes
sendStory Class Referencefinal

Inherits Function.

Description

Sends a new story to a chat; requires can_post_stories right for supergroup and channel chats. Returns a temporary story.

Returns object_ptr<Story>.

Public Fields

int53 chat_id_
 Identifier of the chat that will post the story. Pass Saved Messages chat identifier when posting a story on behalf of the current user.
 
object_ptr< InputStoryContentcontent_
 Content of the story.
 
object_ptr< inputStoryAreasareas_
 Clickable rectangle areas to be shown on the story media; pass null if none.
 
object_ptr< formattedTextcaption_
 Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters; can have entities only if getOption("can_use_text_entities_in_story_caption").
 
object_ptr< StoryPrivacySettingsprivacy_settings_
 The privacy settings for the story; ignored for stories sent to supergroup and channel chats.
 
int32 active_period_
 Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.
 
object_ptr< storyFullIdfrom_story_full_id_
 Full identifier of the original story, which content was used to create the story; pass null if the story isn't repost of another story.
 
bool is_posted_to_chat_page_
 Pass true to keep the story accessible after expiration.
 
bool protect_content_
 Pass true if the content of the story must be protected from forwarding and screenshotting.
 

Public Types

using ReturnType = object_ptr< story >
 Typedef for the type returned by the function.
 

Public Instance Methods

 sendStory ()
 
 sendStory (int53 chat_id_, object_ptr< InputStoryContent > &&content_, object_ptr< inputStoryAreas > &&areas_, object_ptr< formattedText > &&caption_, object_ptr< StoryPrivacySettings > &&privacy_settings_, int32 active_period_, object_ptr< storyFullId > &&from_story_full_id_, bool is_posted_to_chat_page_, bool protect_content_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Instance Methods inherited from TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Static Public Attributes

static const std::int32_t ID = -424987902
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ sendStory() [1/2]

sendStory ( )

Default constructor for a function, which sends a new story to a chat; requires can_post_stories right for supergroup and channel chats. Returns a temporary story.

Returns object_ptr<Story>.

◆ sendStory() [2/2]

sendStory ( int53  chat_id_,
object_ptr< InputStoryContent > &&  content_,
object_ptr< inputStoryAreas > &&  areas_,
object_ptr< formattedText > &&  caption_,
object_ptr< StoryPrivacySettings > &&  privacy_settings_,
int32  active_period_,
object_ptr< storyFullId > &&  from_story_full_id_,
bool  is_posted_to_chat_page_,
bool  protect_content_ 
)

Creates a function, which sends a new story to a chat; requires can_post_stories right for supergroup and channel chats. Returns a temporary story.

Returns object_ptr<Story>.

Parameters
[in]chat_id_Identifier of the chat that will post the story. Pass Saved Messages chat identifier when posting a story on behalf of the current user.
[in]content_Content of the story.
[in]areas_Clickable rectangle areas to be shown on the story media; pass null if none.
[in]caption_Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters; can have entities only if getOption("can_use_text_entities_in_story_caption").
[in]privacy_settings_The privacy settings for the story; ignored for stories sent to supergroup and channel chats.
[in]active_period_Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.
[in]from_story_full_id_Full identifier of the original story, which content was used to create the story; pass null if the story isn't repost of another story.
[in]is_posted_to_chat_page_Pass true to keep the story accessible after expiration.
[in]protect_content_Pass true if the content of the story must be protected from forwarding and screenshotting.

Method Documentation

◆ store()

void store ( TlStorerToString &  s,
const char *  field_name 
) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


The documentation for this class was generated from the following file: