errbotio / errbot

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
http://errbot.io
GNU General Public License v3.0
3.12k stars 612 forks source link

Not enough flow examples #1570

Closed vmasyagin closed 2 years ago

vmasyagin commented 2 years ago

My task is to organize the flow in such a way that the user chooses several times from the given values. Say, at some step, the user is shown a list to choose from: 1 A 2 B 3 C And I want the next action for the user to simply enter a number from 1 to 3 and go on with the flow. How can I organize this? I can't find examples.

nzlosh commented 2 years ago

Have you seen the advanced flow section? https://errbot.readthedocs.io/en/latest/user_guide/flow_development/advanced.html?highlight=flow It shows how to do loops and store context. I don't have a great deal of experience using flows so can't offer a direct solution to your question off the top of my head.

vmasyagin commented 2 years ago

Have you seen the advanced flow section? https://errbot.readthedocs.io/en/latest/user_guide/flow_development/advanced.html?highlight=flow It shows how to do loops and store context. I don't have a great deal of experience using flows so can't offer a direct solution to your question off the top of my head.

Of course, but there is no such example. Let me explain again. I want this behavior: user: /start bot: Choose one of the options: 1 A 2 B 3 С user: 1 bot: Choose one of the options for something else that matches the selection above (A) in the previous step: 1 first 2 second ...

vmasyagin commented 2 years ago

and now it works for me like this: user: /start bot: Choose one of the options: 1 A 2 B 3 С user: /choose option 1 bot: Choose one of the options for something else that matches the selection above (A) in the previous step: 1 first 2 second ...

nzlosh commented 2 years ago

You want the user to be able to respond with raw text rather than a bot command?

vmasyagin commented 2 years ago

You want the user to be able to respond with raw text rather than a bot command?

yes

nzlosh commented 2 years ago

According to the documentation:

Flows are a feature in Errbot to enable plugin designers to chain several plugin commands together into a “conversation”.

So it seems errbot doesn't provide the functionality you're asking for out of the box.

vmasyagin commented 2 years ago

sad but thanks for the reply

nzlosh commented 2 years ago

It seems that flows are designed as guides for users to execute logical sequences of commands rather than an interactive questionnaire. A custom plugin would fit the questionnaire use case better where processing arbitrary message could be performed with a specific context in mind.