/** * 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 $chatId * @param \CURLFile|string $document * @param int|null $replyToMessageId * @param Types\ReplyKeyboardMarkup|Types\ReplyKeyboardHide|Types\ForceReply|null $replyMarkup * * @return \TelegramBot\Api\Types\Message * @throws \TelegramBot\Api\InvalidArgumentException * @throws \TelegramBot\Api\Exception */ public function sendDocument($chatId, $document, $replyToMessageId = null, $replyMarkup = null) { return Message::fromResponse($this->call('sendDocument', ['chat_id' => (int) $chatId, 'document' => $document, 'reply_to_message_id' => $replyToMessageId, 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson()])); }
/** * Use this method to edit only the reply markup of messages sent by the bot or via the bot * * @param int|string $chatId * @param int $messageId * @param Types\ReplyKeyboardMarkup|Types\ReplyKeyboardHide|Types\ForceReply|null $replyMarkup * * @return \TelegramBot\Api\Types\Message * @throws \TelegramBot\Api\InvalidArgumentException * @throws \TelegramBot\Api\Exception */ public function editMessageReplyMarkup($chatId, $messageId, $replyMarkup = null) { return Message::fromResponse($this->call('editMessageText', ['chat_id' => $chatId, 'message_id' => $messageId, 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson()])); }