telegram

C++ cUrl send an image buff to telegram bot via api

China☆狼群 提交于 2021-02-05 10:02:07
问题 I'm trying to send an image buff with cUrl to the telegram API using c++. Just to know I' m developing on Windows 10. Here is all I have done. First I send a photo from my hard drive using curl from terminal using this command: curl -s -X POST "https://api.telegram.org/bottoken/sendPhoto" -F chat_id=id -F photo="@D:/a.jpg" On the telegram chat I receive the photo with this command meanwhile on the console in which I did the cUrl request I have a response like this: {"ok":true,"result":{

C++ cUrl send an image buff to telegram bot via api

只谈情不闲聊 提交于 2021-02-05 10:01:11
问题 I'm trying to send an image buff with cUrl to the telegram API using c++. Just to know I' m developing on Windows 10. Here is all I have done. First I send a photo from my hard drive using curl from terminal using this command: curl -s -X POST "https://api.telegram.org/bottoken/sendPhoto" -F chat_id=id -F photo="@D:/a.jpg" On the telegram chat I receive the photo with this command meanwhile on the console in which I did the cUrl request I have a response like this: {"ok":true,"result":{

telegram bot api python run_daily method

天涯浪子 提交于 2021-01-29 16:41:41
问题 Hey i am trying to run a telegram bot on a daily base so i tried different things. updater = Updater(<botkey>, use_context=True) dp = updater.dispatcher dp.job_queue.run_daily(pollen, datetime.time(hour=20, minute=9), days=(0, 1, 2, 3, 4, 5, 6)) dp.add_error_handler(error) updater.start_polling() updater.idle() def pollen(update, context): bot.send_message(chat_id=chat_id, text='text') or updater = Updater(<botkey>, use_context=True) dp = updater.dispatcher dp.add_handler(CommandHandler(

DialogFlow - send custom payload for telegram such as video

落爺英雄遲暮 提交于 2021-01-29 14:29:05
问题 Folks. I need to send video file from dialog flow as URI to telegram user. Tried: { "telegram": { "video": "https://" } } Tried to guess JSON format for fulfillment message via "payload" but nothing works. And I could not find documentation about the required format. How to do it ? 回答1: So apparently you cannot send a video in Telegram. According to doc the only supported rich responses are Image, Card, Quick Replay, and Custom Payload (which includes text and hyperlink). If you want to send

Why does venue telepot isn't correct?

一世执手 提交于 2021-01-29 12:59:01
问题 I'm trying to do a bot which could get your street name by telpot. I've inserted location in line 22 (location) and it works. But when i want to try with 'venue' it doesnt work. Can someone help me to get the name street (or venue) of my users? import json import time from pprint import pprint import telepot from telepot.loop import MessageLoop import telepot.namedtuple bot = telepot.Bot(token) lista = ["New York","Los Angeles","Miami","Toronto","Berlin","Rome","Ciao"] seq = iter(lista)

How can I open a specific telegram account with preloaded text message

蹲街弑〆低调 提交于 2021-01-29 10:44:00
问题 Is it possible to open a specific account with a preloaded text like this: tg://resolve?domain={USER_NAME}&text=Hi, default message https://t.me/{USER_NAME}?text=Hi, default message 回答1: There isn't (yet) a option to open a chat for a specific user, however, you can open the Telegram app, with an preloaded text, the user get's the option to pick a recipient from there chat list; Use the following url; tg://msg_url?url=Hi%21%20I%27m%20an%20example%21 Where; url is the preloaded message (or

Telegram Bot API File Download Path Returns 404

吃可爱长大的小学妹 提交于 2021-01-28 07:22:25
问题 I am currently working on a Telegram Bot project which requires me to download Images send by users to the bot. I followed the API documentation which says to use the getFile call to access the file_path. The file should then be found using the path (https://api.telegram.org/file/bot/) Everything works until I try to access the file using the address above. It always returns 404. However not a json containing the 404 message, but a black screen in the browser and 404 in the page response.

Telegram can not compile with different package name

早过忘川 提交于 2021-01-28 05:23:00
问题 I have succeed compile telegram using default package. But when I rename and refactor all the package with my own package name, update jni sub module and create jni .so by following this link https://stackoverflow.com/a/34323758/7531970, use ndk 14b and put all details needed. But I still keep getting this error, please help me 08-25 23:39:55.027 26920-26959/com.sipo.messenger E/FA: Uploading is not possible. App measurement disabled 08-25 23:39:55.027 26920-26920/com.sipo.messenger D

Getting signals from telegram channel and placing them in MT4 using Python

前提是你 提交于 2021-01-25 07:12:38
问题 I would like to read messages from a Telegram channel (which are essential forex signals) and place the orders in MT4 windows application. For now, I have made a python script which listens to the channels and stores messages in a database. I can also parse the messages for necessary values like TP,SL etc. Now, that I have those signals, how can I place them? I read in others answers about ZeroMQ and Python binding but I don't need to do any analysis or strategy building, I just want to place

Getting signals from telegram channel and placing them in MT4 using Python

試著忘記壹切 提交于 2021-01-25 07:10:39
问题 I would like to read messages from a Telegram channel (which are essential forex signals) and place the orders in MT4 windows application. For now, I have made a python script which listens to the channels and stores messages in a database. I can also parse the messages for necessary values like TP,SL etc. Now, that I have those signals, how can I place them? I read in others answers about ZeroMQ and Python binding but I don't need to do any analysis or strategy building, I just want to place