replyDocument method

Future<Message> replyDocument(
  1. dynamic document, {
  2. bool withQuote = false,
  3. dynamic thumbnail,
  4. String? caption,
  5. String? parseMode,
  6. List<MessageEntity>? captionEntities,
  7. bool? disableNotification,
  8. bool? allowSendingWithoutReply,
  9. ReplyMarkup? replyMarkup,
})

Reply to the recieved message with a document

A wrapper around TeleDart.sendDocument. On success, returns the sent Message.

Apart from a document to reply with, 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> replyDocument(
  dynamic document, {
  bool withQuote = false,
  dynamic thumbnail,
  String? caption,
  String? parseMode,
  List<MessageEntity>? captionEntities,
  bool? disableNotification,
  bool? allowSendingWithoutReply,
  ReplyMarkup? replyMarkup,
}) =>
    _teledart.sendDocument(chat.id, document,
        messageThreadId: messageThreadId,
        thumbnail: thumbnail,
        caption: caption,
        parseMode: parseMode,
        captionEntities: captionEntities,
        disableNotification: disableNotification,
        replyToMessageId: withQuote ? messageId : null,
        allowSendingWithoutReply: allowSendingWithoutReply,
        replyMarkup: replyMarkup);