Skip to content

Commit 45a15a4

Browse files
committed
trying to send inline rep:wsonse
1 parent a76a18c commit 45a15a4

File tree

1 file changed

+43
-5
lines changed

1 file changed

+43
-5
lines changed

src/Commands/InlinequeryCommand.php

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,49 @@ public function execute()
2727
{
2828
$update = $this->getUpdate();
2929
$inline_query = $update->getInlineQuery();
30-
echo $inline_query->getQuery();
31-
30+
//$inline_query->getQuery();
31+
//$update->getUpdateId();
32+
$data = array();
33+
$data['inline_query_id']= $update->getUpdateId();
34+
$data['inline_query_id']= (string) time();
35+
//$data['cache_time']=60;
36+
//$data['is_personal']="false";
37+
//$data['next_offset']="122;
38+
$data['results']='[
39+
{
40+
"type": "article",
41+
"id": "001",
42+
"title": "UC Browser",
43+
"message_text": "Text of the first message",
44+
"parse_mode": "Markdown",
45+
"disable_web_page_preview": true,
46+
"url": "telegram.com",
47+
"hide_url": true,
48+
"description": "Optional. Short description of the result",
49+
"thumb_url": "http://icons.iconarchive.com/icons/martz90/circle/64/uc-browser-icon.png",
50+
"thumb_width": 64,
51+
"thumb_height": 64
52+
},
53+
{
54+
"type": "article",
55+
"id": "002",
56+
"title": "Bitcoin",
57+
"message_text": "*Text of the second message*",
58+
"parse_mode": "Markdown",
59+
"disable_web_page_preview": true,
60+
"url": "bitcoin.org",
61+
"hide_url": true,
62+
"description": "Short description of the result",
63+
"thumb_url": "http://www.coinwarz.com/content/images/bitcoin-64x64.png",
64+
"thumb_width": 64,
65+
"thumb_height": 64
66+
}
67+
]';
3268

33-
//$result = Request::sendMessage($data);
34-
//return $result->isOk();
35-
return 1;
69+
$result = Request::answerInlineQuery($data);
70+
71+
72+
return $result->isOk();
73+
//return 1;
3674
}
3775
}

0 commit comments

Comments
 (0)