Z
Z
zi2015-09-22 05:05:50
Telegram
zi, 2015-09-22 05:05:50

How to properly subscribe to the newsletter via the Telegram bot?

Hello! I started to explore the possibilities of bots for Telegram.
I made my own bot, installed it on the server https://github.com/akalongman/php-telegram-bot , connected it with the bot via WebHook, the commands work, there is a connection. The idea is to subscribe to important news from one site. That is, it is necessary that a person subscribes to the news and then, if the editor adds the news and marks the "hot news" flag, then this news would come to all subscribers.
The question is how to implement this correctly, as I understand it, the subscription is a table in the site database that will contain user IDs in telegrams? Then it will be necessary to run through this entire table and send messages? Or is it much easier?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton_Shevtsov, 2015-09-24
@Anton_Shevtsov

Where is it even easier? ) iterate over the id and send a message to each.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question