public function answerInlineQuery(string $results = '', string $switch_pm_text = '', $switch_pm_parameter = '', bool $is_personal = true, int $cache_time = 300) : bool
    {
        if (!isset($this->_inline_query_id)) {
            throw new BotException("Inline query id not set, wrong update");
        }

        $parameters = [
            'inline_query_id' => $this->_inline_query_id,
            'switch_pm_text' => $switch_pm_text,
            'is_personal' => $is_personal,
            'switch_pm_parameter' => $switch_pm_parameter,
            'cache_time' => $cache_time
        ];

        if (isset($results) && $results !== '') {
            $parameters['results'] = $results;
        }

        return $this->execRequest('answerInlineQuery?' . http_build_query($parameters));
    }
public function answerInlineQuery(string $results = '', string $switch_pm_text = '', $switch_pm_parameter = '', bool $is_personal = true, int $cache_time = 300) : bool
    {
        if (!isset($this->_inline_query_id)) {
            throw new BotException("Inline query id not set, wrong update");
        }

        $parameters = [
            'inline_query_id' => $this->_inline_query_id,
            'switch_pm_text' => $switch_pm_text,
            'is_personal' => $is_personal,
            'switch_pm_parameter' => $switch_pm_parameter,
            'cache_time' => $cache_time
        ];

        if (isset($results) && $results !== '') {
            $parameters['results'] = $results;
        }

        return $this->execRequest('answerInlineQuery?' . http_build_query($parameters));
    }
public function answerInlineQuery ( string $ results = '' , string $ switch_pm_text = '' , $ switch_pm_parameter = '' , bool $ is_personal = true , int $ cache_time = 300 ) : bool { if ( ! isset ( $ this -> _inline_query_id ) ) { throw new BotException ( "Inline query id not set, wrong update" ) ; } $ parameters = [ 'inline_query_id' => $ this -> _inline_query_id , 'switch_pm_text' => $ switch_pm_text , 'is_personal' => $ is_personal , 'switch_pm_parameter' => $ switch_pm_parameter , 'cache_time' => $ cache_time ] ; if ( isset ( $ results ) && $ results !== '' ) { $ parameters [ 'results' ] = $ results ; } return $ this -> execRequest ( 'answerInlineQuery?' . http_build_query ( $ parameters ) ) ; }
\brief Answer a inline query (when the user write @botusername "Query") with a button, that will make user switch to the
private chat with the bot, on the top of the results. [Api reference](https://core.telegram.org/bots/api#answerinlinequery)
@param string $results A JSON-serialized array of results for the inline query. Use PhpBotFramework\Entities\InlineQueryResult class to create and get them.
@param string $switch_pm_text If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter $switch_pm_parameter.
@param bool $is_personal Pass True, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query.
@param int $cache_time The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.
@return bool True on success.
\ brief Answer a inline query ( when the user write