public static function sendMessage($chat_id = null, $text, $inline_keyboard = '', $reply_keyboard = '', $parse_mode = 'HTML', $disable_web_page_preview = false, $disable_notification = false, $reply_to_message_id = '')
    {
        self::initialize();
        $chat_id = $chat_id ? $chat_id : self::$channel_username;
        $params = compact('chat_id','text', 'parse_mode', 'disable_web_page_preview', 'disable_notification', 'reply_to_message_id');
        if($inline_keyboard) {
            $params['reply_markup'] = self::inlineKeyboard($inline_keyboard);
        }
        if($reply_keyboard) {
            $params['reply_markup'] = self::replyKeyboard($reply_keyboard);
        }
        $result = self::sendRequest('sendMessage', $params);
        return $result? $result : false;
    }
public static function sendMessage($chat_id = null, $text, $inline_keyboard = '', $reply_keyboard = '', $parse_mode = 'HTML', $disable_web_page_preview = false, $disable_notification = false, $reply_to_message_id = '')
    {
        self::initialize();
        $chat_id = $chat_id ? $chat_id : self::$channel_username;
        $params = compact('chat_id','text', 'parse_mode', 'disable_web_page_preview', 'disable_notification', 'reply_to_message_id');
        if($inline_keyboard) {
            $params['reply_markup'] = self::inlineKeyboard($inline_keyboard);
        }
        if($reply_keyboard) {
            $params['reply_markup'] = self::replyKeyboard($reply_keyboard);
        }
        $result = self::sendRequest('sendMessage', $params);
        return $result? $result : false;
    }
public static function sendMessage ( $ chat_id = null , $ text , $ inline_keyboard = '' , $ reply_keyboard = '' , $ parse_mode = 'HTML' , $ disable_web_page_preview = false , $ disable_notification = false , $ reply_to_message_id = '' ) { self :: initialize ( ) ; $ chat_id = $ chat_id ? $ chat_id : self :: $ channel_username ; $ params = compact ( 'chat_id' , 'text' , 'parse_mode' , 'disable_web_page_preview' , 'disable_notification' , 'reply_to_message_id' ) ; if ( $ inline_keyboard ) { $ params [ 'reply_markup' ] = self :: inlineKeyboard ( $ inline_keyboard ) ; } if ( $ reply_keyboard ) { $ params [ 'reply_markup' ] = self :: replyKeyboard ( $ reply_keyboard ) ; } $ result = self :: sendRequest ( 'sendMessage' , $ params ) ; return $ result ? $ result : false ; }
Send text messages

@param null $chat_id
@param $text - max length 4096 characters
@param string $inline_keyboard
@param string $reply_keyboard
@param string $parse_mode
@param int $reply_to_message_id
@param bool $display_web_page_preview
@return bool|mixed
Send text messages