sendDocument method
Future<Message>
sendDocument(
- ChatID chatId,
- HttpFile document, {
- HttpFile? thumb,
- ParseMode? parseMode,
- bool? disableNotification,
- bool? protectContent,
- int? replyToMessageId,
- bool? allowSendingWithoutReply,
- ReplyMarkup? replyMarkup,
- 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,
});
}