I want to send premium emojis by Telegram bot (I have a premium account and created a bot with it), but when I try to send it (I send emojis to the premium account), unfortunately, the emoji is sent normally. my code: Message should be like this: Answer This feature will be activated in the future. https://telegram.org/faq_premium#q-can-i-buy-a-premium-subscription-for-my-bots
Tag: telegram-bot
Telegram sendPhoto with multipart/form-data not working?
Hi I am trying to send an image. The documentation states that I can send a file using multipart/form-data. Here is my code: In both cases, I get this response: Other download methods (by ID and by link) work. Can anyone please point me in the right direction? Answer Using the php-telegram-bot library, sendPhoto can be used like so: The
Telegram bot inline keyboard callback not working
I’m using PHP for the telegram bot. Reply callback is working when the callback hit the callback URL but the inline keyboard callback not working. When I click on the inline keyboard button, nothing responds, why it’s happening? Please help me to fix the issues. Answer Have you implemented something to respond the callback query?! When you receive an update
how can i ban some numbers from checking on bot
like if someone type command “!user 123456” then send message “number banned” I tried this but won’t worked… $ban = array(‘112233′,’123456’); if(strpos($message, “!user $ban”) ===0){ sendMessage($chatId, “<u>Number Banned!</u>”, $message_id); } Answer Instead of using strpos, if you’re going to do more commands you should parse out the action and data from the message, then you can use logic to do
Telegram bot – sendMessage text
I have 2 problems with programming telegram bot by PHP. problem: please, When I try send text with more lines by using API of telegram. By this code: <?php $update = file_get_contents('php://…
Is there a bulk messaging limit in telegram bots?
I was sending messages to all my bot subscribers and when the subscribers reach about 400, my bot doesn’t send messages to all but few. my code is in php and I’ve used the sleep() function. I tested it and found out that while sending the message if the messages aren’t sent in 1 min the sending process stops and
Telegram sendPhoto method don’t refresh
I’m using a simple bot code which takes an Image from a php page created using: header(“Content-type: image/png”); and imagepng(); Here is the bot code: if ($text == “/photo”) { $reply_markup = …
Telegram bot sendMessage parse_mode generates HTTP/1.1 400 Bad Request
Using the HTTP API of telegram to send message in PHP like the following: $msg = “New Comment is **added** from:n”.$domain; file_get_contents(‘https://api.telegram.org/botTOKEN:CODE/sendMessage?…
longman telegram bot handle user input
I need to edit record in database from inline button. Bot send message to user with record text and add inline button actions for it (i.e. Edit, Delete etc.) User click button, from callback starts …
i am getting an error when i tried to set webhook for telegram
I want to set webhook for telegram for certain user input so that telegram replied automatically to predefined question and I am able to write the program which is running perfectly fine, but when I tried to set webhook for that program it is showing an error: I tried to set webhook like that: Answer You need to use a