Class Poll
java.lang.Object
io.github.natanimn.telebof.types.updates.Poll
- All Implemented Interfaces:
TelegramUpdate
This class contains information about a poll.
- Since:
- 3 March 2025
- Author:
- Natanim
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BooleanTrue, if the poll allows multiple answersprivate IntegerPoint in time (Unix timestamp) when the poll will be automatically closedprivate Integer0-based identifier of the correct answer option.private StringText that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 charactersprivate List<MessageEntity> Special entities like usernames, URLs, bot commands, etc.private StringUnique poll identifierprivate BooleanTrue, if the poll is anonymousprivate BooleanTrue, if the poll is closedprivate IntegerAmount of time in seconds the poll will be active after creationprivate List<PollOption> List of poll optionsprivate StringPoll question, 1-300 charactersprivate List<MessageEntity> Special entities that appear in the question.private IntegerTotal number of users that voted in the pollprivate PollTypePoll type -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
Unique poll identifier -
question
Poll question, 1-300 characters -
type
Poll type -
explanation
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 -
options
List of poll options -
totalVoterCount
Total number of users that voted in the poll -
correctOptionId
0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot. -
openPeriod
Amount of time in seconds the poll will be active after creation -
closeDate
Point in time (Unix timestamp) when the poll will be automatically closed -
isClosed
True, if the poll is closed -
isAnonymous
True, if the poll is anonymous -
allowsMultipleAnswers
True, if the poll allows multiple answers -
explanationEntities
Special entities like usernames, URLs, bot commands, etc. that appear in the explanation -
questionEntities
Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions
-
-
Constructor Details
-
Poll
public Poll()
-
-
Method Details