forked from bruninoit/altervistabot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinline.php
41 lines (32 loc) · 1.04 KB
/
inline.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
echo "<br>Plugin Inline: 1.0";
if (isset($update["inline_query"])) {
$json = [
//prima riga risultati
[
'type' => 'article',
'id' => 'kakfieokakfieofo',
'title' => 'Invia messaggio...',
'description' => "Premi qui 1",
'message_text' => "Questo appare: testo 1",
'parse_mode' => 'Markdown'
],
//seconda riga risultati
[
'type' => 'article',
'id' => 'alalalalalalala',
'title' => 'Invia messaggio...',
'description' => "Premi qui 2",
'message_text' => "Questo appare: testo 2",
'parse_mode' => 'Markdown'
],
//altre righe eventuali
];
$json = json_encode($json);
$args = [
'inline_query_id' => $inline,
'results' => $json,
'cache_time' => 5
];
$r = new HttpRequest("post", "https://api.telegram.org/$api/answerInlineQuery", $args);
}