Commit 45a15a46 authored by MBoretto's avatar MBoretto

trying to send inline rep:wsonse

parent a76a18c9
......@@ -27,11 +27,49 @@ class InlinequeryCommand extends Command
{
$update = $this->getUpdate();
$inline_query = $update->getInlineQuery();
echo $inline_query->getQuery();
//$inline_query->getQuery();
//$update->getUpdateId();
$data = array();
$data['inline_query_id']= $update->getUpdateId();
$data['inline_query_id']= (string) time();
//$data['cache_time']=60;
//$data['is_personal']="false";
//$data['next_offset']="122;
$data['results']='[
{
"type": "article",
"id": "001",
"title": "UC Browser",
"message_text": "Text of the first message",
"parse_mode": "Markdown",
"disable_web_page_preview": true,
"url": "telegram.com",
"hide_url": true,
"description": "Optional. Short description of the result",
"thumb_url": "http://icons.iconarchive.com/icons/martz90/circle/64/uc-browser-icon.png",
"thumb_width": 64,
"thumb_height": 64
},
{
"type": "article",
"id": "002",
"title": "Bitcoin",
"message_text": "*Text of the second message*",
"parse_mode": "Markdown",
"disable_web_page_preview": true,
"url": "bitcoin.org",
"hide_url": true,
"description": "Short description of the result",
"thumb_url": "http://www.coinwarz.com/content/images/bitcoin-64x64.png",
"thumb_width": 64,
"thumb_height": 64
}
]';
//$result = Request::sendMessage($data);
//return $result->isOk();
return 1;
$result = Request::answerInlineQuery($data);
return $result->isOk();
//return 1;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment