Class SendPoll

java.lang.Object
io.micronaut.chatbots.telegram.api.send.Send
io.micronaut.chatbots.telegram.api.send.SendPoll

public class SendPoll extends Send
Since:
1.0.0
Author:
Sergio del Amo
  • Constructor Details

    • SendPoll

      public SendPoll()
  • Method Details

    • getQuestion

      @NonNull public @NonNull String getQuestion()
      Returns:
      Poll question, 1-255 characters.
    • setQuestion

      public void setQuestion(@NonNull @NonNull String question)
      Parameters:
      question - Poll question, 1-255 characters.
    • getOptions

      @NonNull public @NonNull List<String> getOptions()
      Returns:
      List of answer options, 2-10 strings 1-100 characters each.
    • setOptions

      public void setOptions(@NonNull @NonNull List<String> options)
      Parameters:
      options - List of answer options, 2-10 strings 1-100 characters each.
    • isAnonymous

      @Nullable public @Nullable Boolean isAnonymous()
      Returns:
      True, if the poll needs to be anonymous, defaults to True.
    • setAnonymous

      public void setAnonymous(@Nullable @Nullable Boolean anonymous)
      Parameters:
      anonymous - True, if the poll needs to be anonymous, defaults to True.
    • getType

      @Nullable public @Nullable String getType()
      Returns:
      Poll type, “quiz” or “regular”, defaults to “regular”.
    • setType

      public void setType(@Nullable @Nullable String type)
      Parameters:
      type - Poll type, “quiz” or “regular”, defaults to “regular”.
    • getAllowsMultipleAnswers

      @Nullable public @Nullable Boolean getAllowsMultipleAnswers()
      Returns:
      True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False.
    • setAllowsMultipleAnswers

      public void setAllowsMultipleAnswers(@Nullable @Nullable Boolean allowsMultipleAnswers)
      Parameters:
      allowsMultipleAnswers - True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False.
    • getCorrectOptionId

      @Nullable public @Nullable Integer getCorrectOptionId()
      Returns:
      0-based identifier of the correct answer option, required for polls in quiz mode.
    • setCorrectOptionId

      public void setCorrectOptionId(@Nullable @Nullable Integer correctOptionId)
      Parameters:
      correctOptionId - 0-based identifier of the correct answer option, required for polls in quiz mode.
    • isClosed

      @Nullable public @Nullable Boolean isClosed()
      Returns:
      True if the poll needs to be immediately closed.
    • setClosed

      public void setClosed(@Nullable @Nullable Boolean closed)
      Parameters:
      closed - Pass True, if the poll needs to be immediately closed.