Package org.drinkless.tdlib
Class TdApi.PollOption
java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.PollOption
- Enclosing class:
TdApi
Describes one answer option of a poll.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintPoint in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll.Identifier of the user or chat who added the option; may be null if the option existed from creation of the poll.static final intIdentifier uniquely determining type of the object.Unique identifier of the option in the poll; may be empty if yet unassigned.booleanTrue, if the option is being chosen by a pending setPollAnswer request.booleanTrue, if the option was chosen by the user.Option media; may be null if none.Identifiers of recent voters for the option, if the poll is non-anonymous and poll results are available.Option text; 1-100 characters; may contain only custom emoji entities.intThe percentage of votes for this option; 0-100.intNumber of voters for this option, available only for closed or voted polls, or if the current user is the creator of the poll. -
Constructor Summary
ConstructorsConstructorDescriptionDescribes one answer option of a poll.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. -
Method Summary
Modifier and TypeMethodDescriptionintReturns an identifier uniquely determining type of the object.Methods inherited from class org.drinkless.tdlib.TdApi.Object
toString
-
Field Details
-
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
public int voterCountNumber 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 votePercentageThe 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
public boolean isChosenTrue, if the option was chosen by the user. -
isBeingChosen
public boolean isBeingChosenTrue, 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
public int additionDatePoint in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier 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.ObjectReturns an identifier uniquely determining type of the object.- Specified by:
getConstructorin classTdApi.Object- Returns:
- this.CONSTRUCTOR
-