Skip to content

PollOption

Type · TDLib 1.8.67 · d1085f9c

Describes one answer option of a poll

PollOption(
  id: string,
  text: FormattedText,
  media: PollMedia,
  voter_count: int32,
  vote_percentage: int32,
  recent_voter_ids: list of MessageSender,
  is_chosen: Bool,
  is_being_chosen: Bool,
  author: MessageSender,
  addition_date: int32
) → PollOption

id

string

Unique identifier of the option in the poll; may be empty if yet unassigned

text

FormattedText

Option text; 1-100 characters; may contain only custom emoji entities

media

PollMedia

Option media; may be null if none. If present, currently, can be only of the types pollMediaAnimation, pollMediaLink, pollMediaLocation, pollMediaPhoto, pollMediaSticker, pollMediaVenue, or pollMediaVideo

voter_count

int32

Number of voters for this option, available only for closed or voted polls, or if the current user is the creator of the poll

vote_percentage

int32

The percentage of votes for this option; 0-100

recent_voter_ids

list of MessageSender

Identifiers of recent voters for the option, if the poll is non-anonymous and poll results are available

is_chosen

Bool

True, if the option was chosen by the user

is_being_chosen

Bool

True, if the option is being chosen by a pending setPollAnswer request

author

MessageSender

Identifier of the user or chat who added the option; may be null if the option existed from creation of the poll

addition_date

int32

Point in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll