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