public function answerInlineQuery(
        $inlineQueryId,
        $results,
        $cacheTime = 300,
        $isPersonal = false,
        $nextOffset = '',
        $switchPmText = null,
        $switchPmParameter = null
    ) {
        $results = array_map(function ($item) {
            /* @var AbstractInlineQueryResult $item */
            return json_decode($item->toJson(), true);
        }, $results);

        return $this->call('answerInlineQuery', [
            'inline_query_id' => $inlineQueryId,
            'results' => json_encode($results),
            'cache_time' => $cacheTime,
            'is_personal' => $isPersonal,
            'next_offset' => $nextOffset,
            'switch_pm_text' => $switchPmText,
            'switch_pm_parameter' => $switchPmParameter,
        ]);
    }
public function answerInlineQuery(
        $inlineQueryId,
        $results,
        $cacheTime = 300,
        $isPersonal = false,
        $nextOffset = '',
        $switchPmText = null,
        $switchPmParameter = null
    ) {
        $results = array_map(function ($item) {
            /* @var AbstractInlineQueryResult $item */
            return json_decode($item->toJson(), true);
        }, $results);

        return $this->call('answerInlineQuery', [
            'inline_query_id' => $inlineQueryId,
            'results' => json_encode($results),
            'cache_time' => $cacheTime,
            'is_personal' => $isPersonal,
            'next_offset' => $nextOffset,
            'switch_pm_text' => $switchPmText,
            'switch_pm_parameter' => $switchPmParameter,
        ]);
    }
public function answerInlineQuery ( $ inlineQueryId , $ results , $ cacheTime = 300 , $ isPersonal = false , $ nextOffset = '' , $ switchPmText = null , $ switchPmParameter = null ) { $ results = array_map ( function ( $ item ) { /* @var AbstractInlineQueryResult $item */ return json_decode ( $ item -> toJson ( ) , true ) ; } , $ results ) ; return $ this -> call ( 'answerInlineQuery' , [ 'inline_query_id' => $ inlineQueryId , 'results' => json_encode ( $ results ) , 'cache_time' => $ cacheTime , 'is_personal' => $ isPersonal , 'next_offset' => $ nextOffset , 'switch_pm_text' => $ switchPmText , 'switch_pm_parameter' => $ switchPmParameter , ] ) ; }
Use this method to send answers to an inline query. On success, True is returned.
No more than 50 results per query are allowed.

@param string $inlineQueryId
@param AbstractInlineQueryResult[] $results
@param int $cacheTime
@param bool $isPersonal
@param string $nextOffset
@param string $switchPmText
@param string $switchPmParameter

@return mixed
@throws Exception
Use this method to send answers to an inline query . On success True is returned . No more than 50 results per query are allowed .