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 Summary
Constructors Constructor Description SendPoll()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
getAllowsMultipleAnswers()
java.lang.Integer
getCorrectOptionId()
java.util.List<java.lang.String>
getOptions()
java.lang.String
getQuestion()
java.lang.String
getType()
java.lang.Boolean
isAnonymous()
java.lang.Boolean
isClosed()
void
setAllowsMultipleAnswers(java.lang.Boolean allowsMultipleAnswers)
void
setAnonymous(java.lang.Boolean anonymous)
void
setClosed(java.lang.Boolean closed)
void
setCorrectOptionId(java.lang.Integer correctOptionId)
void
setOptions(java.util.List<java.lang.String> options)
void
setQuestion(java.lang.String question)
void
setType(java.lang.String type)
-
Methods inherited from class io.micronaut.chatbots.telegram.api.send.Send
getChatId, getDisableNotification, getMethod, getReplyMarkup, getReplyToMessageId, setChatId, setDisableNotification, setReplyMarkup, setReplyToMessageId
-
-
-
-
Method Detail
-
getQuestion
@NonNull public java.lang.String getQuestion()
- Returns:
- Poll question, 1-255 characters.
-
setQuestion
public void setQuestion(@NonNull java.lang.String question)
- Parameters:
question
- Poll question, 1-255 characters.
-
getOptions
@NonNull public java.util.List<java.lang.String> getOptions()
- Returns:
- List of answer options, 2-10 strings 1-100 characters each.
-
setOptions
public void setOptions(@NonNull java.util.List<java.lang.String> options)
- Parameters:
options
- List of answer options, 2-10 strings 1-100 characters each.
-
isAnonymous
@Nullable public java.lang.Boolean isAnonymous()
- Returns:
- True, if the poll needs to be anonymous, defaults to True.
-
setAnonymous
public void setAnonymous(@Nullable java.lang.Boolean anonymous)
- Parameters:
anonymous
- True, if the poll needs to be anonymous, defaults to True.
-
getType
@Nullable public java.lang.String getType()
- Returns:
- Poll type, “quiz” or “regular”, defaults to “regular”.
-
setType
public void setType(@Nullable java.lang.String type)
- Parameters:
type
- Poll type, “quiz” or “regular”, defaults to “regular”.
-
getAllowsMultipleAnswers
@Nullable public java.lang.Boolean getAllowsMultipleAnswers()
- Returns:
- True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False.
-
setAllowsMultipleAnswers
public void setAllowsMultipleAnswers(@Nullable java.lang.Boolean allowsMultipleAnswers)
- Parameters:
allowsMultipleAnswers
- True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False.
-
getCorrectOptionId
@Nullable public java.lang.Integer getCorrectOptionId()
- Returns:
- 0-based identifier of the correct answer option, required for polls in quiz mode.
-
setCorrectOptionId
public void setCorrectOptionId(@Nullable java.lang.Integer correctOptionId)
- Parameters:
correctOptionId
- 0-based identifier of the correct answer option, required for polls in quiz mode.
-
isClosed
@Nullable public java.lang.Boolean isClosed()
- Returns:
- True if the poll needs to be immediately closed.
-
setClosed
public void setClosed(@Nullable java.lang.Boolean closed)
- Parameters:
closed
- Pass True, if the poll needs to be immediately closed.
-
-