public function sendDocument(
        $chatId,
        $document,
        $caption = null,
        $replyToMessageId = null,
        $replyMarkup = null,
        $disableNotification = false,
        $parseMode = null
    ) {
        return Message::fromResponse($this->call('sendDocument', [
            'chat_id' => $chatId,
            'document' => $document,
            'caption' => $caption,
            'reply_to_message_id' => $replyToMessageId,
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
            'disable_notification' => (bool)$disableNotification,
            'parse_mode' => $parseMode
        ]));
    }
public function sendDocument(
        $chatId,
        $document,
        $caption = null,
        $replyToMessageId = null,
        $replyMarkup = null,
        $disableNotification = false,
        $parseMode = null
    ) {
        return Message::fromResponse($this->call('sendDocument', [
            'chat_id' => $chatId,
            'document' => $document,
            'caption' => $caption,
            'reply_to_message_id' => $replyToMessageId,
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
            'disable_notification' => (bool)$disableNotification,
            'parse_mode' => $parseMode
        ]));
    }
public function sendDocument ( $ chatId , $ document , $ caption = null , $ replyToMessageId = null , $ replyMarkup = null , $ disableNotification = false , $ parseMode = null ) { return Message :: fromResponse ( $ this -> call ( 'sendDocument' , [ 'chat_id' => $ chatId , 'document' => $ document , 'caption' => $ caption , 'reply_to_message_id' => $ replyToMessageId , 'reply_markup' => is_null ( $ replyMarkup ) ? $ replyMarkup : $ replyMarkup -> toJson ( ) , 'disable_notification' => ( bool ) $ disableNotification , 'parse_mode' => $ parseMode ] ) ) ; }
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.

@param int|string $chatId chat_id or @channel_name
@param \CURLFile|string $document
@param string|null $caption
@param int|null $replyToMessageId
@param Types\ReplyKeyboardMarkup|Types\ReplyKeyboardHide|Types\ForceReply|
Types\ReplyKeyboardRemove|null $replyMarkup
@param bool $disableNotification
@param string|null $parseMode

@return \TelegramBot\Api\Types\Message
@throws \TelegramBot\Api\InvalidArgumentException
@throws \TelegramBot\Api\Exception
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 .