Class MessagePoll.Answer

java.lang.Object
net.dv8tion.jda.api.entities.messages.MessagePoll.Answer
Enclosing interface:
MessagePoll

public static class MessagePoll.Answer extends Object
One of the answers for a poll.

Provides the current getVotes() and whether you have voted for it.

  • Constructor Details

    • Answer

      public Answer(long id, String text, EmojiUnion emoji, int votes, boolean selfVoted)
  • Method Details

    • getId

      public long getId()
      The id of this answer.
      Returns:
      The answer id.
    • getText

      @Nonnull public String getText()
      The text content of the answer.
      Returns:
      The answer label.
    • getEmoji

      @Nullable public EmojiUnion 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.