For the chatbot, it is simple to implement a webhooks event for a single event such as:
If option A, send X
If option B, send Y
If Option C, send Z
However, what if the next event should be based off the previous event. Such as there are options listed as:
A)
1
2
3
B)
1
2
3
Where you have to first send a letter, and then send a number. So if I want to choose B2, I have to send B, and then 2. However, it needs a way to remember the B choice. The way webhooks is implemented, the next message starts the program over so instead of the number, it would expect the letter again from the beginning.
If it was plain python, I would use the input() method after the first letter choice to wait for the number choice, but this method isn't an available option in webhooks as it breaks the program.
I would assume that there needs to be some sort of database for this, where letter choice is remembered and can then choose a number. I am running my webhooks through Heroku and would like insight for how this can be implemented if via database or if anyone can suggest a different method.