-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
85 lines (74 loc) · 2.63 KB
/
test.php
File metadata and controls
85 lines (74 loc) · 2.63 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
$in_pass = json_encode([
'inline_keyboard' => [
[['text' => "Создать пароль", 'switch_inline_query' => " "]],
[['text' => "Рандомное число", 'switch_inline_query' => " "]],
]
]);
if ($text == "inline") {
bot('sendmessage', [
'chat_id' => $cid,
'text' => "<b>Наш бот теперь работает и в инлайн режиме!</b>",
'parse_mode' => 'html',
'reply_markup' => $in_pass,
]);
}
//inline
$iuid = $update->inline_query->from->id;
$iid = $update->inline_query->id;
$icid = $update->inline_query->chat->id;
$imid = $update->inline_query->message->id;
$bot = '@LuciRand_Bot' . bot('getme', ['bot'])->result->username;
$query = $update->inline_query->query;
// if(mb_stripos($query,"pass")!==false){
// bot('answerInlineQuery',[
// 'inline_query_id'=>$iid,
// 'cache_time'=>1,
// 'results'=>json_encode([[
// 'type'=>'article',
// 'id'=>base64_encode(1),
// 'thumb_url'=>"https://i.pinimg.com/originals/77/92/e6/7792e685d1e213b67bfcafacae03651c.jpg",
// 'title'=>"Рандомный пароль!",
// 'input_message_content'=>[
// 'disable_web_page_preview'=>true,
// 'parse_mode'=>'MarkDown',
// 'message_text'=>"`$password`",
// ],
// 'reply_markup'=>[
// 'inline_keyboard'=>[
// [['text'=>"Перейти в бот",'url'=>"t.me/lucirand_bot"]],
// ]],
// ]
// ])
// ]);
// }
#===================================================
if (mb_stripos($query) !== true) {
bot('answerInlineQuery', [
'inline_query_id' => $iid,
'cache_time' => 1,
'results' => json_encode([[
'type' => 'article',
'id' => base64_encode(1),
'thumb_url' => "https://lucifer.xvest.ru/random/img/rand.png",
'title' => "Рандомные числа!",
'input_message_content' => [
'disable_web_page_preview' => true,
'parse_mode' => 'MarkDown',
'message_text' => "👉*$rand_numb100*",
]],
[
'type' => 'article',
'id' => base64_encode(2),
'thumb_url' => "https://lucifer.xvest.ru/random/img/pass.jpg",
'title' => "Рандомный пароль!",
'input_message_content' => [
'disable_web_page_preview' => true,
'parse_mode' => 'MarkDown',
'message_text' => "`$password`",
]],
]
)
]);
}
//