Poll

class pyrogram.types.Poll

A Poll.

Parameters:
  • id (str) – Unique poll identifier.

  • question (FormattedText, optional) – Poll question, 1-300 characters.

  • options (List of PollOption) – List of poll options.

  • total_voter_count (int, optional) – 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 the poll allows to change the chosen answer options.

  • chosen_option_ids (List of int, optional) – Array of 0-based index of the chosen option), None in case of no vote yet.

  • correct_option_ids (List of int, optional) – Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which are closed or were sent (not forwarded) by the bot or to the private chat with the bot.

  • explanation (pyrogram.types.FormattedText, 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.

  • explanation_media (MessageContent, optional) – Media that is shown when the user chooses an incorrect answer or taps on the lamp icon. May be None if none or the poll is unanswered yet.

  • 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.

  • description (FormattedText, optional) – Description of the poll. Only for polls inside the Message object.

  • description_media (MessageContent, optional) – Media attached to the poll. Only for polls inside the Message object.

  • voter (User, optional) – The user that voted in the poll.