poll_t

struct banana::api::poll_t

This object contains information about a poll.

string_t id

Unique poll identifier

string_t question

Poll question, 1-300 characters

array_t<poll_option_t> options

List of poll options

integer_t total_voter_count

Total number of users that voted in the poll

boolean_t is_closed

True, if the poll is closed

boolean_t is_anonymous

True, if the poll is anonymous

string_t type

Poll type, currently can be “regular” or “quiz”

boolean_t allows_multiple_answers

True, if the poll allows multiple answers

optional_t<integer_t> correct_option_id

Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.

optional_t<string_t> explanation

Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters

optional_t<array_t<message_entity_t>> explanation_entities

Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation

optional_t<integer_t> open_period

Optional. Amount of time in seconds the poll will be active after creation

optional_t<integer_t> close_date

Optional. Point in time (Unix timestamp) when the poll will be automatically closed