|
TDLib
|
Inherits Object.
Describes a poll.
Public Member Functions | |
| poll () | |
| poll (int64 id_, object_ptr< formattedText > &&question_, array< object_ptr< pollOption > > &&options_, int32 total_voter_count_, array< object_ptr< MessageSender > > &&recent_voter_ids_, bool can_get_voters_, bool can_see_results_, bool is_anonymous_, bool allows_multiple_answers_, bool allows_revoting_, bool members_only_, array< string > &&country_codes_, array< int32 > &&option_order_, object_ptr< PollType > &&type_, int32 open_period_, int32 close_date_, bool is_closed_, object_ptr< PollVoteRestrictionReason > &&vote_restriction_reason_) | |
| void | store (TlStorerToString &s, const char *field_name) const final |
| Public Member Functions inherited from TlObject | |
| TlObject & | operator= (const TlObject &)=delete |
| TlObject & | operator= (TlObject &&)=default |
| virtual void | store (TlStorerCalcLength &s) const |
| virtual void | store (TlStorerUnsafe &s) const |
| TlObject ()=default | |
| TlObject (const TlObject &)=delete | |
| TlObject (TlObject &&)=default | |
| virtual | ~TlObject ()=default |
Public Attributes | |
| bool | allows_multiple_answers_ |
| True, if multiple answer options can be chosen simultaneously. | |
| bool | allows_revoting_ |
| True, if the poll can be answered multiple times. | |
| bool | can_get_voters_ |
| True, if the current user can get voters in the poll using getPollVoters. | |
| bool | can_see_results_ |
| True, if the current user can see results of the poll. | |
| int32 | close_date_ |
| Point in time (Unix timestamp) when the poll will automatically be closed. | |
| array< string > | country_codes_ |
| The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote. If empty, then all users can participate in the poll. | |
| int64 | id_ |
| Unique poll identifier. | |
| bool | is_anonymous_ |
| True, if the poll is anonymous. | |
| bool | is_closed_ |
| True, if the poll is closed. | |
| bool | members_only_ |
| True, if only the users that are members of the chat for more than a day will be able to vote. | |
| int32 | open_period_ |
| Amount of time the poll will be active after creation, in seconds. | |
| array< int32 > | option_order_ |
| The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed. | |
| array< object_ptr< pollOption > > | options_ |
| List of poll answer options. | |
| object_ptr< formattedText > | question_ |
| Poll question; 1-300 characters; may contain only custom emoji entities. | |
| array< object_ptr< MessageSender > > | recent_voter_ids_ |
| Identifiers of recent voters, if the poll is non-anonymous and poll results are available. | |
| int32 | total_voter_count_ |
| Total number of voters, participating in the poll. | |
| object_ptr< PollType > | type_ |
| Type of the poll. | |
| object_ptr< PollVoteRestrictionReason > | vote_restriction_reason_ |
| The reason describing, why the current user can't vote in the poll; may be null if the user can vote in the poll. | |
Static Public Attributes | |
| static const std::int32_t | ID = -1926406506 |
| Identifier uniquely determining a type of the object. | |
| poll | ( | ) |
Describes a poll.
| poll | ( | int64 | id_, |
| object_ptr< formattedText > && | question_, | ||
| array< object_ptr< pollOption > > && | options_, | ||
| int32 | total_voter_count_, | ||
| array< object_ptr< MessageSender > > && | recent_voter_ids_, | ||
| bool | can_get_voters_, | ||
| bool | can_see_results_, | ||
| bool | is_anonymous_, | ||
| bool | allows_multiple_answers_, | ||
| bool | allows_revoting_, | ||
| bool | members_only_, | ||
| array< string > && | country_codes_, | ||
| array< int32 > && | option_order_, | ||
| object_ptr< PollType > && | type_, | ||
| int32 | open_period_, | ||
| int32 | close_date_, | ||
| bool | is_closed_, | ||
| object_ptr< PollVoteRestrictionReason > && | vote_restriction_reason_ ) |
Describes a poll.
| [in] | id_ | Unique poll identifier. |
| [in] | question_ | Poll question; 1-300 characters; may contain only custom emoji entities. |
| [in] | options_ | List of poll answer options. |
| [in] | total_voter_count_ | Total number of voters, participating in the poll. |
| [in] | recent_voter_ids_ | Identifiers of recent voters, if the poll is non-anonymous and poll results are available. |
| [in] | can_get_voters_ | True, if the current user can get voters in the poll using getPollVoters. |
| [in] | can_see_results_ | True, if the current user can see results of the poll. |
| [in] | is_anonymous_ | True, if the poll is anonymous. |
| [in] | allows_multiple_answers_ | True, if multiple answer options can be chosen simultaneously. |
| [in] | allows_revoting_ | True, if the poll can be answered multiple times. |
| [in] | members_only_ | True, if only the users that are members of the chat for more than a day will be able to vote. |
| [in] | country_codes_ | The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote. If empty, then all users can participate in the poll. |
| [in] | option_order_ | The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed. |
| [in] | type_ | Type of the poll. |
| [in] | open_period_ | Amount of time the poll will be active after creation, in seconds. |
| [in] | close_date_ | Point in time (Unix timestamp) when the poll will automatically be closed. |
| [in] | is_closed_ | True, if the poll is closed. |
| [in] | vote_restriction_reason_ | The reason describing, why the current user can't vote in the poll; may be null if the user can vote in the poll. |
|
finalvirtual |