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

Inherits InputMessageContent.

Description

A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot.

Public Fields

string question_
 Poll question; 1-255 characters (up to 300 characters for bots).
 
array< stringoptions_
 List of poll answer options, 2-10 strings 1-100 characters each.
 
bool is_anonymous_
 True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels.
 
object_ptr< PollTypetype_
 Type of the poll.
 
int32 open_period_
 Amount of time the poll will be active after creation, in seconds; for bots only.
 
int32 close_date_
 Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.
 
bool is_closed_
 True, if the poll needs to be sent already closed; for bots only.
 

Public Instance Methods

 inputMessagePoll ()
 
 inputMessagePoll (string const &question_, array< string > &&options_, bool is_anonymous_, object_ptr< PollType > &&type_, int32 open_period_, int32 close_date_, bool is_closed_)
 
std::int32_t get_id () const final
 
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 = 2054629900
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ inputMessagePoll() [1/2]

A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot.

◆ inputMessagePoll() [2/2]

inputMessagePoll ( string const &  question_,
array< string > &&  options_,
bool  is_anonymous_,
object_ptr< PollType > &&  type_,
int32  open_period_,
int32  close_date_,
bool  is_closed_ 
)

A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot.

Parameters
[in]question_Poll question; 1-255 characters (up to 300 characters for bots).
[in]options_List of poll answer options, 2-10 strings 1-100 characters each.
[in]is_anonymous_True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels.
[in]type_Type of the poll.
[in]open_period_Amount of time the poll will be active after creation, in seconds; for bots only.
[in]close_date_Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.
[in]is_closed_True, if the poll needs to be sent already closed; for bots only.

Method Documentation

◆ get_id()

std::int32_t get_id ( ) const
inlinefinalvirtual

Returns identifier uniquely determining a type of the object.

Returns
this->ID.

Implements TlObject.

◆ 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: