Node Telegram bot api, make chain conversation between user
<p>I have started to write bot logic for telegram by using this <a href="https://github.com/yagop/node-telegram-bot-api" rel="noreferrer">module</a></p>

<p>I can create simple question and answer logic like this:</p>

<pre><code>bot.onText(/\/start/, function(msg, match){
  bot.sendMessage(msg.chat.id, "Hello this is great bot");
});
</code></pre>

<p>When user types <code>/start</code> he will receive this message.</p>

<p>I want to create something like chained conversation between bot and user. Like when user types <code>/buy</code> bot will show options to buy, after that user types what he wants to buy then bot will show types of selected product and so on.</p>

<p>How is it possible to create chained conversation between user and bot? How to make bot remember previous selected commands and reset them when it is time? Do I need to keep in my own database in order to do that?</p>