telegram api constructor · layer 229 · #966e2dbf
poll
Poll
definition
poll#966e2dbf id:long flags:# closed:flags.0?true public_voters:flags.1?true multiple_choice:flags.2?true quiz:flags.3?true open_answers:flags.6?true revoting_disabled:flags.7?true shuffle_answers:flags.8?true hide_results_until_close:flags.9?true creator:flags.10?true subscribers_only:flags.11?true question:TextWithEntities answers:Vector<PollAnswer> close_period:flags.4?int close_date:flags.5?int countries_iso2:flags.12?Vector<string> hash:long = Poll;
parameters
| name | type | description |
|---|---|---|
id | long | ID of the poll |
flags | # | Flags, see TL conditional fields |
closed | true | Whether the poll is closed and doesn't accept any more answers |
public_voters | true | Whether cast votes are publicly visible to all users (non-anonymous poll) |
multiple_choice | true | Whether multiple options can be chosen as answer |
quiz | true | Whether this is a quiz (with wrong and correct answers, results shown in the return type) |
open_answers | true | |
revoting_disabled | true | |
shuffle_answers | true | |
hide_results_until_close | true | |
creator | true | |
subscribers_only | true | |
question | TextWithEntities | The question of the poll (only Premium users can use custom emoji entities here). |
answers | Vector<PollAnswer> | The possible answers (2-poll_answers_max), vote using messages.sendVote. |
close_period | int | Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date. |
close_date | int | Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close_period. |
countries_iso2 | Vector<string> | |
hash | long |
type
history
present in layers 91–229 · constructor id changed 4×
| id | layers |
|---|---|
| #d5529d06 | 91–111 |
| #86e18161 | 112–178 |
| #58747131 | 179–223 |
| #b8425be9 | 224 |
| #966e2dbf | 225–229 |