public function sendMessage(
        $chatId,
        $text,
        $parseMode = null,
        $disablePreview = false,
        $replyToMessageId = null,
        $replyMarkup = null,
        $disableNotification = false
    ) {
        return Message::fromResponse($this->call('sendMessage', [
            'chat_id' => $chatId,
            'text' => $text,
            'parse_mode' => $parseMode,
            'disable_web_page_preview' => $disablePreview,
            'reply_to_message_id' => (int)$replyToMessageId,
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
            'disable_notification' => (bool)$disableNotification,
        ]));
    }
public function sendMessage(
        $chatId,
        $text,
        $parseMode = null,
        $disablePreview = false,
        $replyToMessageId = null,
        $replyMarkup = null,
        $disableNotification = false
    ) {
        return Message::fromResponse($this->call('sendMessage', [
            'chat_id' => $chatId,
            'text' => $text,
            'parse_mode' => $parseMode,
            'disable_web_page_preview' => $disablePreview,
            'reply_to_message_id' => (int)$replyToMessageId,
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
            'disable_notification' => (bool)$disableNotification,
        ]));
    }
public function sendMessage ( $ chatId , $ text , $ parseMode = null , $ disablePreview = false , $ replyToMessageId = null , $ replyMarkup = null , $ disableNotification = false ) { return Message :: fromResponse ( $ this -> call ( 'sendMessage' , [ 'chat_id' => $ chatId , 'text' => $ text , 'parse_mode' => $ parseMode , 'disable_web_page_preview' => $ disablePreview , 'reply_to_message_id' => ( int ) $ replyToMessageId , 'reply_markup' => is_null ( $ replyMarkup ) ? $ replyMarkup : $ replyMarkup -> toJson ( ) , 'disable_notification' => ( bool ) $ disableNotification , ] ) ) ; }
Use this method to send text messages. On success, the sent \TelegramBot\Api\Types\Message is returned.

@param int|string $chatId
@param string $text
@param string|null $parseMode
@param bool $disablePreview
@param int|null $replyToMessageId
@param Types\ReplyKeyboardMarkup|Types\ReplyKeyboardHide|Types\ForceReply|
Types\ReplyKeyboardRemove|null $replyMarkup
@param bool $disableNotification

@return \TelegramBot\Api\Types\Message
@throws \TelegramBot\Api\InvalidArgumentException
@throws \TelegramBot\Api\Exception
Use this method to send text messages . On success the sent \ TelegramBot \ Api \ Types \ Message is returned .