How does multiplayer telegram. bot?

Some time ago he became interested in the telegram-bot. Problems single-player with bots does not occur - tree is constructed responses/input, for example, if you specifically write your name, you can just ask step-by-step input, that is, type:
send-> Surname
send-> Name
send-> middle name
This works because after the introduction of the names of the bot waiting for, now what to put there Name and so on
Actually a question: how this is implemented in multiplayer bots? After all, there is between the Name and Surname, for example, writes another user, the request is processed, and then returned to the bot entry name.
Please tell us how this theory is implemented? Or leave links. Thanks in advance!
June 3rd 19 at 20:20
1 answer
June 3rd 19 at 20:22
As an option to have a database with chat id of users and a message bot to check what a person writes and what he needs to send

Find more questions by tags BotsTelegram