Skip to main content

poll

Poll

type tg.Poll struct { /* ... */ }

Fields

NameTypeRequiredDescription
IDint64yesID of the poll
ClosedboolWhether the poll is closed and doesn't accept any more answers
PublicVotersboolWhether cast votes are publicly visible to all users (non-anonymous poll)
MultipleChoiceboolWhether multiple options can be chosen as answer
QuizboolWhether this is a quiz (with wrong and correct answers, results shown in the return type)
OpenAnswersboolOpenAnswers field of Poll.
RevotingDisabledboolRevotingDisabled field of Poll.
ShuffleAnswersboolShuffleAnswers field of Poll.
HideResultsUntilCloseboolHideResultsUntilClose field of Poll.
CreatorboolCreator field of Poll.
SubscribersOnlyboolSubscribersOnly field of Poll.
QuestionTextWithEntitiesyesThe question of the poll (only Premium users can use custom emoji entities here).
Answers[]PollAnswerClassyesThe possible answers (2-poll_answers_max), vote using messages.sendVote.
ClosePeriodintAmount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.
CloseDateintPoint 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[]stringCountriesISO2 field of Poll.
Hashint64yesHash field of Poll.

References