replyPoll method
Future<Message>
replyPoll(
- String question,
- List<
String> options, { - bool withQuote = false,
- bool? isAnonymous,
- String? type,
- bool? allowsMultipleAnswers,
- int? correctOptionId,
- String? explanation,
- String? explanationParseMode,
- List<
MessageEntity> ? explanationEntities, - int? openPeriod,
- int? closeDate,
- bool? isClosed,
- bool? disableNotification,
- bool? allowSendingWithoutReply,
- ReplyMarkup? replyMarkup,
Reply to the recieved message with a poll
A wrapper around TeleDart.sendPoll. On success, returns the sent Message.
Apart from a question
and a List<String> of options
, it can
also take some options that control the message
appearance and behavior.
Check Telegram API documentation for more information about those options.
Implementation
Future<Message> replyPoll(
String question,
List<String> options, {
bool withQuote = false,
bool? isAnonymous,
String? type,
bool? allowsMultipleAnswers,
int? correctOptionId,
String? explanation,
String? explanationParseMode,
List<MessageEntity>? explanationEntities,
int? openPeriod,
int? closeDate,
bool? isClosed,
bool? disableNotification,
bool? allowSendingWithoutReply,
ReplyMarkup? replyMarkup,
}) =>
_teledart.sendPoll(chat.id, question, options,
messageThreadId: messageThreadId,
isAnonymous: isAnonymous,
type: type,
allowsMultipleAnswers: allowsMultipleAnswers,
correctOptionId: correctOptionId,
explanation: explanation,
explanationParseMode: explanationParseMode,
explanationEntities: explanationEntities,
openPeriod: openPeriod,
closeDate: closeDate,
isClosed: isClosed,
disableNotification: disableNotification,
replyToMessageId: withQuote ? messageId : null,
allowSendingWithoutReply: allowSendingWithoutReply,
replyMarkup: replyMarkup);