replyPoll method

Future<Message> replyPoll(
  1. String question,
  2. List<String> options, {
  3. bool withQuote = false,
  4. bool? isAnonymous,
  5. String? type,
  6. bool? allowsMultipleAnswers,
  7. int? correctOptionId,
  8. String? explanation,
  9. String? explanationParseMode,
  10. List<MessageEntity>? explanationEntities,
  11. int? openPeriod,
  12. int? closeDate,
  13. bool? isClosed,
  14. bool? disableNotification,
  15. bool? allowSendingWithoutReply,
  16. 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);