N
N
nakem2022-01-17 12:57:43
go
nakem, 2022-01-17 12:57:43

How to save the user's state in a telegram bot without a database?

There is a bot that has a default response mode. That is, for example, he will always respond to the message “hello” and “good evening” to everyone. How can I make a different bot mode at the request of the user. It will enter the /change command. And the bot will respond to this particular user not with “good evening”, but with “hi hi”. I generally imagine how to do this with the base. But you can MB somehow without it. MB telegram api has such functionality.
Here I found an option with json https://qna.habr.com/q/640428
But this solution seems a little flimsy.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2022-01-17
@Spargwy

"a little flimsy" (not at all) would be the decision not to use the base.
It can be implemented even with maps.

MB telegram api has such functionality.

And what is this functionality? You carry Brad.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question