Skip to content
Advertisement

Tag: telegram-bot

How to send custom emoji by Telegram bot?

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

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

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

Advertisement