Is it possible to take user input from within an errbot command?

228 Views Asked by At

is it possible to take user input when running a command? For example, I want the user to be able to run !hello bot and have the bot ask them a question and the user answer it without calling another ! command. The standard input() python command does not seem to work for this case. Example of what I hope will work:

user: !hello bot

bot: Hello. How are you today?

user: good

bot responds differently depending of whether the user said good or bad.

I cannot seem to be able to get the above to work in Slack, as when the command is run, the input prompt will appear in the console instead. This does however work when I run the command from the console using errbot -T as the prompt appears there and allows me to type into it. How can I get the same to work for Slack and other chat channels?

0

There are 0 best solutions below