Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# PollOption

class telegram.PollOption(text, voter_count, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object contains information about one answer option in a poll.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `text` and `voter_count` are equal.

  Parameters:

    - text (`str`) – Option text, `1`-`100` characters.

    - voter_count (`int`) – Number of users that voted for this option.

  text

    Option text, `1`-`100` characters.

    Type:

      `str`

  voter_count

    Number of users that voted for this option.

    Type:

      `int`

  Available In

  `telegram.Poll.options`

  MAX_LENGTH = 100

    `telegram.constants.PollLimit.MAX_OPTION_LENGTH`

    New in version 20.0.

  MIN_LENGTH = 1

    `telegram.constants.PollLimit.MIN_OPTION_LENGTH`

    New in version 20.0.