|
26 | 26 | if( $usersList->num_rows > 1 ) { |
27 | 27 | while($user = $usersList->fetch_assoc()){ |
28 | 28 | if($messageParam->type == 'text'){ |
29 | | - sendMessage($messageParam->value,null,null,$user['userid']); |
| 29 | + sendMessage($messageParam->value,json_encode([ |
| 30 | + 'inline_keyboard' => [ |
| 31 | + [['text'=>$buttonValues['start_bot'],'callback_data'=>"mainMenu"]] |
| 32 | + ] |
| 33 | + ]),null,$user['userid']); |
30 | 34 | }elseif($messageParam->type == 'music'){ |
31 | 35 | bot('sendAudio',[ |
32 | 36 | 'chat_id' => $user['userid'], |
33 | 37 | 'audio' => $messageParam->value->fileid, |
34 | 38 | 'caption' => $messageParam->value->caption, |
| 39 | + 'reply_markup'=>json_encode([ |
| 40 | + 'inline_keyboard' => [ |
| 41 | + [['text'=>$buttonValues['start_bot'],'callback_data'=>"mainMenu"]] |
| 42 | + ] |
| 43 | + ]) |
35 | 44 | ]); |
36 | 45 | }elseif($messageParam->type == 'video'){ |
37 | 46 | bot('sendVideo',[ |
38 | 47 | 'chat_id' => $user['userid'], |
39 | 48 | 'video' => $messageParam->value->fileid, |
40 | 49 | 'caption' => $messageParam->value->caption, |
| 50 | + 'reply_markup'=>json_encode([ |
| 51 | + 'inline_keyboard' => [ |
| 52 | + [['text'=>$buttonValues['start_bot'],'callback_data'=>"mainMenu"]] |
| 53 | + ] |
| 54 | + ]) |
41 | 55 | ]); |
42 | 56 | }elseif($messageParam->type == 'voice'){ |
43 | 57 | bot('sendVoice',[ |
44 | 58 | 'chat_id' => $user['userid'], |
45 | 59 | 'voice' => $messageParam->value->fileid, |
46 | 60 | 'caption' => $messageParam->value->caption, |
| 61 | + 'reply_markup'=>json_encode([ |
| 62 | + 'inline_keyboard' => [ |
| 63 | + [['text'=>$buttonValues['start_bot'],'callback_data'=>"mainMenu"]] |
| 64 | + ] |
| 65 | + ]) |
47 | 66 | ]); |
48 | 67 | }elseif($messageParam->type == 'document'){ |
49 | 68 | bot('sendDocument',[ |
50 | 69 | 'chat_id' => $user['userid'], |
51 | 70 | 'document' => $messageParam->value->fileid, |
52 | 71 | 'caption' => $messageParam->value->caption, |
| 72 | + 'reply_markup'=>json_encode([ |
| 73 | + 'inline_keyboard' => [ |
| 74 | + [['text'=>$buttonValues['start_bot'],'callback_data'=>"mainMenu"]] |
| 75 | + ] |
| 76 | + ]) |
53 | 77 | ]); |
54 | 78 | }elseif($messageParam->type == 'photo'){ |
55 | 79 | bot('sendPhoto', [ |
56 | 80 | 'chat_id' => $user['userid'], |
57 | 81 | 'photo' => $messageParam->value->fileid, |
58 | 82 | 'caption' => $messageParam->value->caption, |
| 83 | + 'reply_markup'=>json_encode([ |
| 84 | + 'inline_keyboard' => [ |
| 85 | + [['text'=>$buttonValues['start_bot'],'callback_data'=>"mainMenu"]] |
| 86 | + ] |
| 87 | + ]) |
59 | 88 | ]); |
60 | 89 | }elseif($messageParam->type == "forwardall"){ |
61 | 90 | forwardmessage($user['userid'], $messageParam->chat_id, $messageParam->message_id); |
|
65 | 94 | 'chat_id' => $user['userid'], |
66 | 95 | 'document' => $messageParam->value->fileid, |
67 | 96 | 'caption' => $messageParam->value->caption, |
| 97 | + 'reply_markup'=>json_encode([ |
| 98 | + 'inline_keyboard' => [ |
| 99 | + [['text'=>$buttonValues['start_bot'],'callback_data'=>"mainMenu"]] |
| 100 | + ] |
| 101 | + ]) |
68 | 102 | ]); |
69 | 103 | } |
70 | 104 | $offset++; |
|
0 commit comments