Class MessagePoll.Answer
java.lang.Object
net.dv8tion.jda.api.entities.messages.MessagePoll.Answer
- Enclosing interface:
MessagePoll
One of the answers for a poll.
Provides the current getVotes()
and whether you have voted for it.
-
Constructor Summary
ConstructorDescriptionAnswer
(long id, String text, EmojiUnion emoji, int votes, boolean selfVoted) -
Method Summary
Modifier and TypeMethodDescriptiongetEmoji()
The emoji assigned to this answer.long
getId()
The id of this answer.getText()
The text content of the answer.int
getVotes()
The number of votes this answer has received so far.boolean
Whether the answer was voted for by the currently logged in account.
-
Constructor Details
-
Answer
-
-
Method Details
-
getId
public long getId()The id of this answer.- Returns:
- The answer id.
-
getText
The text content of the answer.- Returns:
- The answer label.
-
getEmoji
The emoji assigned to this answer.- Returns:
EmojiUnion
-
getVotes
public int getVotes()The number of votes this answer has received so far.This might not be
finalized
.- Returns:
- The current number of votes
-
isSelfVoted
public boolean isSelfVoted()Whether the answer was voted for by the currently logged in account.- Returns:
- True, if the bot has voted for this.
-