poll
Poll
type tg.Poll struct { /* ... */ }
Fields
| Name | Type | Required | Description |
|---|---|---|---|
ID | int64 | yes | ID of the poll |
Closed | bool | — | Whether the poll is closed and doesn't accept any more answers |
PublicVoters | bool | — | Whether cast votes are publicly visible to all users (non-anonymous poll) |
MultipleChoice | bool | — | Whether multiple options can be chosen as answer |
Quiz | bool | — | Whether this is a quiz (with wrong and correct answers, results shown in the return type) |
OpenAnswers | bool | — | OpenAnswers field of Poll. |
RevotingDisabled | bool | — | RevotingDisabled field of Poll. |
ShuffleAnswers | bool | — | ShuffleAnswers field of Poll. |
HideResultsUntilClose | bool | — | HideResultsUntilClose field of Poll. |
Creator | bool | — | Creator field of Poll. |
SubscribersOnly | bool | — | SubscribersOnly field of Poll. |
Question | TextWithEntities | yes | The question of the poll (only Premium users can use custom emoji entities here). |
Answers | []PollAnswerClass | yes | The possible answers (2-poll_answers_max), vote using messages.sendVote. |
ClosePeriod | int | — | Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date. |
CloseDate | 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. |
CountriesISO2 | []string | — | CountriesISO2 field of Poll. |
Hash | int64 | yes | Hash field of Poll. |
References
- Official documentation
- Generated Go reference
- TL definition:
poll#966e2dbf