Answer the question
In order to leave comments, you need to log in
Is the telegram bot work plan correct?
Tell me how to properly organize the work with the bot.
There is a service with a news feed, I created a bot, I want a person to be able to subscribe to some news.
For example, a person adds a bot, sees a welcome message, where he is invited to subscribe to several categories of news. He selects one of the categories and now, when news appears in this category, it should come to his chat.
To do this, I'm going to record all users and record the message history. I have the id of the chat from which the message came and I can have dialogs like:
Bot: What's your name?
User: Andrey
Bot: Hello Andrey, what are you interested in?
User: Sports News
Bot: Sports News...
Answer the question
In order to leave comments, you need to log in
You can make buttons to select the category of news.
In one table, write subscriptions (user id and category id). In another table, there is a queue of messages for sending (don't forget to pause, because there is a limit of 30 messages per second).
Do not forget about the possibility of unsubscribing from the mailing list
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question