sendDocument method

Future<Message> sendDocument(
  1. ChatID chatId,
  2. HttpFile document, {
  3. HttpFile? thumb,
  4. String? caption,
  5. ParseMode? parseMode,
  6. List<MessageEntity>? captionEntities,
  7. bool? disableNotification,
  8. bool? protectContent,
  9. int? replyToMessageId,
  10. bool? allowSendingWithoutReply,
  11. ReplyMarkup? replyMarkup,
  12. bool? disableContentTypeDetection,
})
inherited

Use this method to send general files.

On success, the sent Message is returned.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

Implementation

Future<Message> sendDocument(
  ChatID chatId,
  HttpFile document, {
  HttpFile? thumb,
  String? caption,
  ParseMode? parseMode,
  List<MessageEntity>? captionEntities,
  bool? disableNotification,
  bool? protectContent,
  int? replyToMessageId,
  bool? allowSendingWithoutReply,
  ReplyMarkup? replyMarkup,
  bool? disableContentTypeDetection,
}) {
  return _client.apiCall(_token, 'sendDocument', {
    'chat_id': chatId,
    'document': document,
    'caption': caption,
    'parse_mode': parseMode,
    'caption_entities': captionEntities,
    'thumb': thumb,
    'disable_notification': disableNotification,
    'protect_content': protectContent,
    'reply_to_message_id': replyToMessageId,
    'allow_sending_without_reply': allowSendingWithoutReply,
    'reply_markup': replyMarkup,
    'disable_content_type_detection': disableContentTypeDetection,
  });
}