Class TdApi.PollOption

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.PollOption
Enclosing class:
TdApi

public static class TdApi.PollOption extends TdApi.Object
Describes one answer option of a poll.
  • Field Details

    • id

      public String id
      Unique identifier of the option in the poll; may be empty if yet unassigned.
    • text

      public TdApi.FormattedText text
      Option text; 1-100 characters; may contain only custom emoji entities.
    • media

      @Nullable public TdApi.MessageContent media
      Option media; may be null if none. If present, currently, can be only of the types messageAnimation, messageLocation, messagePhoto, messageSticker, messageVenue, or messageVideo without caption.
    • voterCount

      public int voterCount
      Number of voters for this option, available only for closed or voted polls, or if the current user is the creator of the poll.
    • votePercentage

      public int votePercentage
      The percentage of votes for this option; 0-100.
    • recentVoterIds

      public TdApi.MessageSender[] recentVoterIds
      Identifiers of recent voters for the option, if the poll is non-anonymous and poll results are available.
    • isChosen

      public boolean isChosen
      True, if the option was chosen by the user.
    • isBeingChosen

      public boolean isBeingChosen
      True, if the option is being chosen by a pending setPollAnswer request.
    • author

      @Nullable public TdApi.MessageSender author
      Identifier of the user or chat who added the option; may be null if the option existed from creation of the poll.
    • additionDate

      public int additionDate
      Point in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • PollOption

      public PollOption()
      Describes one answer option of a poll.
    • PollOption

      public PollOption(String id, TdApi.FormattedText text, TdApi.MessageContent media, int voterCount, int votePercentage, TdApi.MessageSender[] recentVoterIds, boolean isChosen, boolean isBeingChosen, TdApi.MessageSender author, int additionDate)
      Describes one answer option of a poll.
      Parameters:
      id - Unique identifier of the option in the poll; may be empty if yet unassigned.
      text - Option text; 1-100 characters; may contain only custom emoji entities.
      media - Option media; may be null if none. If present, currently, can be only of the types messageAnimation, messageLocation, messagePhoto, messageSticker, messageVenue, or messageVideo without caption.
      voterCount - Number of voters for this option, available only for closed or voted polls, or if the current user is the creator of the poll.
      votePercentage - The percentage of votes for this option; 0-100.
      recentVoterIds - Identifiers of recent voters for the option, if the poll is non-anonymous and poll results are available.
      isChosen - True, if the option was chosen by the user.
      isBeingChosen - True, if the option is being chosen by a pending setPollAnswer request.
      author - Identifier of the user or chat who added the option; may be null if the option existed from creation of the poll.
      additionDate - Point in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll.
  • Method Details

    • getConstructor

      public int getConstructor()
      Description copied from class: TdApi.Object
      Returns an identifier uniquely determining type of the object.
      Specified by:
      getConstructor in class TdApi.Object
      Returns:
      this.CONSTRUCTOR