src/TgCommands.php
public function sendDocument($peer, $mediaUri, $cleanUp = false)
    {
        $peer = $this->escapePeer($peer);

        //Process the requested media file.
        $processedMedia = $this->processMediaUri($mediaUri);
        if ( ! $processedMedia) {
            return false;
        }

        //Send media file.
        $result = $this->exec('send_document ' . $peer . ' ' . $processedMedia['filepath']);

        if ($cleanUp) {
            //Clean up if media file came from REMOTE address
            $this->cleanUpMedia($processedMedia);
        }

        return $result;
    }
public function sendDocument($peer, $mediaUri, $cleanUp = false)
    {
        $peer = $this->escapePeer($peer);

        //Process the requested media file.
        $processedMedia = $this->processMediaUri($mediaUri);
        if ( ! $processedMedia) {
            return false;
        }

        //Send media file.
        $result = $this->exec('send_document ' . $peer . ' ' . $processedMedia['filepath']);

        if ($cleanUp) {
            //Clean up if media file came from REMOTE address
            $this->cleanUpMedia($processedMedia);
        }

        return $result;
    }
Sends a Document to $peer

@param string $peer
@param string $mediaUri Either a URL or a local filename of the media you wish to send
@param bool   $cleanUp
@return bool
@uses exec()
@uses escapePeer()
@uses escapeStringArgument()