telegram-bot

php telegram answercallbackquery sendmessage

安稳与你 提交于 2020-01-17 06:39:10
问题 I'm trying to develop a Telegram Bot in PHP, but i failed to make my bot answer the user when he press an inline button. Can someone help me sending a message (sendMessage method) after calling the answerCallback method? Here's my last trial code: if ($call_back_query != null) { $response = $call_back_query; $botUrl = "https://api.telegram.org/bot" . BOT_TOKEN . "/answerCallbackQuery"; $postFields = array('callback_query_id' => $call_back_id, 'text' => $response); $ch = curl_init(); curl

Google Dialogflow Quick Replies formatting issues in Telegram

两盒软妹~` 提交于 2020-01-16 08:42:53
问题 I had create a chatbot using Dialogflow and integrated it with Facebook Messenger & Telegram. I noticed that for the Quick Replies in Telegram (Link 1) appears differently in FB Messenger (Link 2). Is there any way to make it nicer and more presentable in Telegram? Telegram Facebook Messenger This is my Quick Replies settings in Dialogflow. Dialogflow 回答1: in DialogFlow you can indeed (as Marc pointed out) use a Custom Payload for Telegram, here it is an example: { "telegram": { "text": "What

Google Dialogflow Quick Replies formatting issues in Telegram

只谈情不闲聊 提交于 2020-01-16 08:42:38
问题 I had create a chatbot using Dialogflow and integrated it with Facebook Messenger & Telegram. I noticed that for the Quick Replies in Telegram (Link 1) appears differently in FB Messenger (Link 2). Is there any way to make it nicer and more presentable in Telegram? Telegram Facebook Messenger This is my Quick Replies settings in Dialogflow. Dialogflow 回答1: in DialogFlow you can indeed (as Marc pointed out) use a Custom Payload for Telegram, here it is an example: { "telegram": { "text": "What

Telegram group ban/boot/kick user

梦想与她 提交于 2020-01-14 14:14:57
问题 I need to create a Telegram bot to moderate a group and be able to ban/boot/kick users from the group. I could not find anything in the Telegram API to boot a user from a group, how can a bot do this through the API? 回答1: You can use kickChatMember to remove a user from a group. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. 来源: https://stackoverflow.com/questions/39817082/telegram-group-ban-boot-kick-user

Telegram group ban/boot/kick user

孤街浪徒 提交于 2020-01-14 14:14:29
问题 I need to create a Telegram bot to moderate a group and be able to ban/boot/kick users from the group. I could not find anything in the Telegram API to boot a user from a group, how can a bot do this through the API? 回答1: You can use kickChatMember to remove a user from a group. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. 来源: https://stackoverflow.com/questions/39817082/telegram-group-ban-boot-kick-user

Telegram group ban/boot/kick user

纵饮孤独 提交于 2020-01-14 14:14:03
问题 I need to create a Telegram bot to moderate a group and be able to ban/boot/kick users from the group. I could not find anything in the Telegram API to boot a user from a group, how can a bot do this through the API? 回答1: You can use kickChatMember to remove a user from a group. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. 来源: https://stackoverflow.com/questions/39817082/telegram-group-ban-boot-kick-user

Telegram bot: How do I hide inline keyboard ? PHP

只愿长相守 提交于 2020-01-13 09:36:09
问题 I made a telegram bot with an inline keyboard.(via InlineKeyboardMarkup ) I like to hide (or make it one-time ) keyboard after user response. How can I do that in PHP? Here is a view of my bot: 回答1: There is method editMessageReplyMarkup. You can transfer empty inline_keyboard param. But it's may not working on some devices (i have problem with iphone, for problem devieces you can edit markup to "thanks" button, and after remomeve it) 回答2: Try updating the message with editMessageText method

How to hide Telegram BOT commands when it is part of a group?

不打扰是莪最后的温柔 提交于 2020-01-13 09:04:51
问题 I'm trying to use a Telegram BOT to send messages to a group. First, I thought that it'd be enough to know the group chat id to accomplish that, but it's not. The BOT MUST be part of that group. OK, it kind of make sense, but the problem is: When you add a BOT into a group (a large group in this case) everyone start seeing a new icon on their devices, a "slash" icon. And what do they do ? They click on it, see the list of commands, choose one of them, and all of a sudden everyone is getting a

How to hide Telegram BOT commands when it is part of a group?

你离开我真会死。 提交于 2020-01-13 09:03:20
问题 I'm trying to use a Telegram BOT to send messages to a group. First, I thought that it'd be enough to know the group chat id to accomplish that, but it's not. The BOT MUST be part of that group. OK, it kind of make sense, but the problem is: When you add a BOT into a group (a large group in this case) everyone start seeing a new icon on their devices, a "slash" icon. And what do they do ? They click on it, see the list of commands, choose one of them, and all of a sudden everyone is getting a

How to send an Embedded Image along with text in a Message via Telegram Bot API

对着背影说爱祢 提交于 2020-01-12 05:01:05
问题 Using Telegram Bot API, I'm aware that it is possible to send an image via https://core.telegram.org/bots/api#sendphoto However, how can I embed a remote image into a formatted message? The message I am looking to send, can be compared to a news article with a title in bold, an image, and a longer text with links. I figured out how to create bold text and links with markdown, but I'm failing at inserting images. How can we do that? 回答1: you must set ParseMode in HTML and set your Image Url in