B
B
Bassein2016-11-29 16:34:40
API
Bassein, 2016-11-29 16:34:40

How to receive data in Telegram bot?

How to get data from the site (for example, weather temperature, bash quotes, etc.) for your Telegram bot? How is it implemented? For example, there is already a quote script, but where to insert it? Your bot with the channel has already been created. I'm a complete noob, so if possible in detail, in the style of: "you take this, copy-paste it into this."

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Kushev, 2016-11-29
@Qushev

If the bot will send on request from the user, then you bind it to a button, for example. If the bot itself will post, then make a temporary function

N
nllm, 2016-11-29
@nllm

Quotes are already somewhere in the database. So right?
Then the bot takes the data from the database and gives it to the user, for example, when requested in a group chat (via an inline request), or it is launched by cron and sends a quote to the general chat.
And so directly "take and copy" this will not happen. There is github, you can look for examples there, read the source code and make your own.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question