Poll¶
- class pyrogram.types.Poll¶
A Poll.
- Parameters:
id (
str) – Unique poll identifier.question (
str) – Poll question, 1-255 characters.options (List of
PollOption) – List of poll options.question_entities (List of
MessageEntity, optional) – Special entities like usernames, URLs, bot commands, etc. that appear in the poll question.total_voter_count (
int) – Total number of users that voted in the poll.is_closed (
bool) – True, if the poll is closed.is_anonymous (
bool, optional) – True, if the poll is anonymous.type (
PollType, optional) – Poll type.allows_multiple_answers (
bool, optional) – True, if the poll allows multiple answers.allows_revoting (
bool, optional) – True, if voters can change their vote (revoting enabled).hide_results_until_close (
bool, optional) – True, if results are hidden until the poll is closed.shuffle_answers (
bool, optional) – True, if poll answers are shuffled for each voter.open_answers (
bool, optional) – True, if users can add new answer options dynamically.chosen_option_id (
int, optional) – 0-based index of the chosen option. None if no vote cast yet.correct_option_ids (List of
int, optional) – 0-based identifiers of all correct answer options. Available only for quiz-mode polls.correct_option_id (
int, optional) – 0-based identifier of the first correct answer option, for backward compatibility.explanation (
str, optional) – Text shown when a user chooses an incorrect answer in a quiz-style poll.explanation_entities (List of
MessageEntity, optional) – Special entities in the explanation.open_period (
int, optional) – Amount of time in seconds the poll will be active after creation.close_date (
datetime, optional) – Point in time when the poll will be automatically closed.recent_voters (List of
User, optional) – List of users who recently voted.