Answer the question
In order to leave comments, you need to log in
How to properly implement state storage?
I am writing a bot for a telegram chat messenger.
Technologies: python (django, telepot), heroku The
bot will have quite extensive functionality, and it seems to me that it is convenient to assign some kind of state to each user and change it according to the next user message or other event.
The question is, what is the best way to store this state? Stack? Or did I go completely wrong and should I reconsider the architecture?
UPD: an example of states as I see them:
https://pp.vk.me/c630820/v630820245/1fd3a/qkR8IsUd...
Answer the question
In order to leave comments, you need to log in
If the nesting is large, then the stack. If it’s small, then it’s probably better not to bother with the stack, but to do something like a context.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question