Category : telegram-bot

Hi guys I’ll explain my code: I have a telegram bot and I have to write many messages quickly in a group and to write a message it is necessary to execute a link (using the Telegram Api). To do this I use Curl: curl_setopt($ch, CURLOPT_URL, $url_telegram); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, ..

Read more

I created a composer library muaath5/simple-bot-api, That is a simple Telegram Bot API. I used command composer require muaath5/simple-bot-api, vendor/autoload.php was generated. This is my website source, And This is my webhook code. I’m getting error PHP Fatal error: Uncaught Error: Class "SimpleBotAPITelegramBot" not found in /app/web/bots/TestPaymentV2Bot/webhook.php:26 Note that I included vendor/autoload.php, But class not ..

Read more

i have problem with expire time i find a open source on internet and try for run it on my cpanel host and this bot is about unknown chatting system and this bot doesn’t have a lot of member and this subject cause when members try for finding person, no body found and bot has ..

Read more

I’m trying to show alert like this https://i.stack.imgur.com/0lSAk.png My test code looks like this $url = "https://api.telegram.org/botTOKEN/answerCallbackQuery"; $response = file_get_contents($url."?callback_query_id=". $callback_query_id ."&text=SUCCESS&show_alert=true"); $response was { "ok": true, "result": true }, so I think parameter $callback_query_id is correct. But alert didn’t appear. That is the problem. A tried other bots (not mine) and other devices, and ..

Read more

I have this condition if(checkAds($userID)) { Code that must do } else { $param = array( "chat_id" => $chatID, "parse_mode" => "HTML", "text" => $errorReadCondition ); sendBot("sendMessage", $param); } In the separate file I have these codes function checkAds($userID) { global $db; global $prefix; $ad = $db->Query("SELECT id FROM ".$prefix."allows WHERE id_utente = ‘$userID’"); if($db->Found($ad)) ..

Read more

when I am trying to /register it always replies Registered but nothing inserted in the database 🙁 Here is my code:- <?php if($text == "/register"){ bot(‘sendMessage’,[ ‘chat_id’=>$chat_id, ‘reply_to_message_id’=>$mid, ‘text’=>"Click the below button to register", ‘reply_markup’=>json_encode([ ‘inline_keyboard’=>[ [[‘text’=>"Register 📑", ‘callback_data’=>"register"]] ] ]) ]); } if($data == "register"){ mysqli_query($con, "INSERT table(user_id) VALUES($userId)"); bot(‘editMessageText’,[ ‘chat_id’=>$chat_id2, ‘message_id’=>$message_id, ‘text’=>"Registered ✅" ..

Read more

when i am trying to /register it always reply Registered but nothing inserted in database 🙁 Here is my code:- if($text == "/register"){ bot(‘sendMessage’,[ ‘chat_id’=>$chat_id, ‘reply_to_message_id’=>$mid, ‘text’=>"Click the below button to register", ‘reply_markup’=>json_encode([ ‘inline_keyboard’=>[ [[‘text’=>"Register 📑", ‘callback_data’=>"register"]] ] ]) ]); } if($data == "register"){ mysqli_query($con, "INSERT table(user_id) VALUES($userId)"); bot(‘editMessageText’,[ ‘chat_id’=>$chat_id2, ‘message_id’=>$message_id, ‘text’=>"Registered ✅" ]); } ..

Read more

I want to send a message with url button to my telegram channel using telegram bot. I have string msg = "Hello, Welcome To My Telegram Channel" imageURL = "https://cdn.pixabay.com/photo/2020/08/11/14/34/greeting-5480092_1280.png" FaceBook – https://facebook.com | YouTube – https://youtube.com | Twitter – https://twitter.com Instagram – https://instagram.com I want to create a post like this : Please help ..

Read more