telegram-bot

How to show telegram bot inline keyboard button with safe url

不打扰是莪最后的温柔 提交于 2019-12-12 09:21:58
问题 I have the following code: inline_keyboard: [ [{ text: 'Authorize', callback_data: '1', url: 'https://google.com' }], ], When I press the button that comes out this code, the resulting url is modified to: tg://unsafe_url?url=https%3A%2F%2Fgoogle.com%2F Then, when the user presses the button, a confirmation modal appears. I've seen other bots with url buttons that don't have that confirmation button. For example https://ifttt.com connects with telegram and has buttons that I guess are safe.

How to show options in telegram bot?

孤街浪徒 提交于 2019-12-12 07:28:56
问题 I want to write a bot telegram.How to put possible option in my bot.I insert a picture of sample bot with this functionality. 回答1: For that, you have to talk to BotFather. In the Telegram App, open the chat with BotFather. Send him /setcommands . He will present you with a list of your bots. Pick the bot for which you want to set the command menu. Compose and send the command list. Using your image as an example, these 4 lines should do: start - Description 1 menu - Description 2 help -

telegram bot don't send mp3 file from xammp server in windows server

ⅰ亾dé卋堺 提交于 2019-12-12 04:46:11
问题 My mp3 link is : 1.mp3 OS = Windows Server 2008 and run xammp server My code is : https://api.telegram.org/bot_token/sendAudio?chat_id=@test&audio=http://panel.cafefars.com:8088/mp3/1.mp3 Error after run : {"ok":false,"error_code":400,"description":"Bad Request: failed to get HTTP URL content"} mp3 url is correct but telegram not download thanks all 回答1: Firstly you should encode your URL - by this one for example. Secondly you should check your URL because it doesn't work for me too, but

send multiple videos at the same time on telegram bot using c#?

扶醉桌前 提交于 2019-12-12 04:35:29
问题 I have create one api for sending multiple videos at the same time in a loop with telegram bot using c#. I am also getting success for uploading videos on telegram bot. However, I am facing one issue on this task. Right now I am uploading 1 or 2 videos at the same time in the loop and it's works. But when I try with 10 or more videos, only 2 or 3 videos get uploaded successfully, and suddenly my utility stops. It would be very helpful if someone could identify my mistake in the following code

Timeout-per-turn logic for a game

假装没事ソ 提交于 2019-12-12 04:26:55
问题 I'm creating a game in telegram bot and now i already reached the "PLAYING" state. The most difficult part is the timeout-per-turn algorithm (for me). Here's the breakdown: Game starting.. Got 4 players The game objective is to answer the question. The question is : Mention the names of animal. The order to answer is : Player C --> Player B --> Player D --> Player A. Each player has the maximum 5 seconds to answer (can be less). Okay now, the game will begin in 3.. 2.. 1.. GO!! Player C

clear pending_update_count in Telegram Bot

寵の児 提交于 2019-12-12 04:04:22
问题 I created a Telegram Bot and setwebhook to a ssl url. My developing language is Php. In testing time, every thing worked fine but after many hours and two or three users have been registered, I got bellow error on getWebhookInfo {"ok":true,"result":{"url":"https://xx.com/get-text","has_custom_certificate":false,"pending_update_count":111,"last_error_date":1501993548,"last_error_message":"Read timeout expired","max_connections":40}} I found that pending_update_count could not be cleared. After

Telegram, Java: upload file to send in sendAnimation

微笑、不失礼 提交于 2019-12-11 18:55:50
问题 There's a method in Telegram API called sendAnimation . There are two obligatory paramteres: chat_id and animation . animation 's descriptio is this: Type : InputFile or String Description : Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. More info on Sending Files » I have a local .gif file

Why does the “Intention Priority” not work?

社会主义新天地 提交于 2019-12-11 14:58:43
问题 Docs: https://dialogflow.com/docs/intents My example: https://ufile.io/tds8e (for restore) It primarily consists of a welcome intent that asks a question, and two followup intents. The three relevant intents look like this: Desired scenario: I'm ready. Ask your questions I don't know Ok, this is a little hint: TRIangle I don't know Oh, you are hopeless. Three, three angles, stupid man. Now the following happens: I'm ready. Ask your questions I don't know Ok, this is a little hint: TRIangle I

Undefined symbols for architecture x86_64: “_SSLv2_ …”

浪尽此生 提交于 2019-12-11 13:03:58
问题 I am trying to build a small example for a Telegram Bot library in C++ (https://github.com/reo7sp/tgbot-cpp#samples) but when linking I get this output: Undefined symbols for architecture x86_64: "_SSLv2_client_method", referenced from: boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in libTgBot.a(HttpClient.cpp.o) "_SSLv2_method", referenced from: boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in libTgBot.a(HttpClient.cpp.o) "_SSLv2