Answer the question
In order to leave comments, you need to log in
How to write a Telegram bot correctly?
Comrades, good afternoon to all.
There was a need to write a bot for the cart. I will do it for the first time and therefore I wanted to consult first.
Bot for making an appointment with a doctor. The bot has an admin (doctor) and a user.
The admin, for his part, sets important settings in the bot: Free days, possible procedures, etc.
The user selects these free days and signs up for a visit.
That is, at the level of a regular program, everything is clear: The doctor comes in, sets the settings, and all this is saved in the database. Then the user comes in, sees the opportunities, selects them, and the result of his actions is also recorded in the database, and both interested parties receive a corresponding notification.
And how to implement all this in a bot?
I understand that somewhere on the vps there should be a database with access interfaces so that there is always access.
But should there be 2 bots? One for the user and one for the doctor?
And if I need to distribute the same bot to different doctors, but in order to maintain access to one common database, then what should I do here? Just replicate the bot itself? I think this is a stupid choice.
Answer the question
In order to leave comments, you need to log in
One database and one bot. There are as many tables of doctors as there are doctors themselves. And one table with records to them from clients. In the table of clients, for example: client_id/doctor_id/record_date/record_creation_date, etc.
All this is realized in one or two
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question