#[non_exhaustive]pub struct Poll {Show 18 fields
pub id: String,
pub question: String,
pub options: Vec<PollOption>,
pub total_voter_count: i64,
pub is_closed: bool,
pub is_anonymous: bool,
pub poll_type: String,
pub allows_multiple_answers: bool,
pub correct_option_id: Option<i64>,
pub correct_option_ids: Option<Vec<i64>>,
pub explanation: Option<String>,
pub explanation_entities: Option<Vec<MessageEntity>>,
pub open_period: Option<i64>,
pub close_date: Option<i64>,
pub question_entities: Option<Vec<MessageEntity>>,
pub allows_revoting: Option<bool>,
pub description: Option<String>,
pub description_entities: Option<Vec<MessageEntity>>,
}Expand description
Information about a poll.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringUnique poll identifier.
question: StringPoll question; 1-300 characters.
options: Vec<PollOption>List of poll options.
total_voter_count: i64Total number of users that voted in the poll.
is_closed: booltrue if the poll is closed.
is_anonymous: booltrue if the poll is anonymous.
poll_type: StringPoll type, either "regular" or "quiz".
allows_multiple_answers: booltrue if the poll allows multiple answers.
correct_option_id: Option<i64>Zero-based identifier of the correct answer option. Available only for closed quiz polls sent or received by the bot.
Deprecated in Bot API 9.6 — use correct_option_ids instead.
correct_option_ids: Option<Vec<i64>>Zero-based identifiers of the correct answer options. Available only for closed quiz polls sent or received by the bot.
Added in Bot API 9.6 (replaces correct_option_id).
explanation: Option<String>Text shown when a user chooses an incorrect answer or taps the lamp icon in a quiz poll.
explanation_entities: Option<Vec<MessageEntity>>Special entities in the explanation text.
open_period: Option<i64>Amount of time in seconds the poll will be active after creation.
close_date: Option<i64>Unix timestamp when the poll will be automatically closed.
question_entities: Option<Vec<MessageEntity>>Special entities that appear in the poll question.
allows_revoting: Option<bool>true if voters can revote.
Added in Bot API 9.6.
description: Option<String>Description of the poll.
Added in Bot API 9.6.
description_entities: Option<Vec<MessageEntity>>Special entities in the description.
Added in Bot API 9.6.