Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if($bot->callback_data == 'livechat'){
- $query = $pdo->prepare("SELECT * FROM livechat WHERE id = ?");
- $query->execute([$bot->callback_user_id]);
- if(!$query->rowCount()){
- $pdo->prepare("INSERT INTO livechat (id, livechat) VALUES (?,?)")->execute(["$bot->callback_user_id",0]);
- $tastiera = '[{"text":"↩️Esci", "callback_data":"leftchat"}]';
- $bot->editMessageText($bot->callback_user_id,$bot->callback_message_id,"<b>Sei entrato in chat</b>",$tastiera,'inline');
- }else{
- $bot->sendMessage($bot->callback_user_id,"❌Sei già in chat❌");
- }
- die;
- }
- if($bot->text and $bot->tipo_chat == "private"){
- $controllo = $pdo->prepare("SELECT * FROM livechat WHERE id = ?");
- $controllo->execute([$bot->user_id]);
- if(!$controllo->rowCount()){
- $lc = false;
- }else{
- $lc = true;
- }
- if($lc and !$bot->text == "/start"){
- $admin = "701253371";
- forwardMessage($admin, $bot->user_id, $bot->message_id);
- sendMessage($admin, "#ID$bot->user_id");
- die;
- }
- else{
- if($bot->user_id == "701253371" || $bot->text == "/start"){
- }
- else{
- sendMessage($bot->user_id, "Entra in chat GHEI!");
- die;
- }
- }
- }
- if($bot->user_id == "701253371" and $bot->tipo_chat == "private"){
- $mex = explode('#ID', $bot->reply_text);
- $fix = explode(' ', $mex[1]);
- $mes = $fix[0];
- if($mes == "" and $bot->tipo_chat == "private"){
- sendMessage($bot->chat_id_reply_forward,$bot->text);
- die;
- }
- else{
- sendMessage($mes,$bot->text);
- die;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement