Search code examples
botframeworkmicrosoft-teamsdisabled-input

is it Possible to Disable input in teams app for my chatbot


I'm building a chatbot with microsofts bot framework, nodejs. There are features in the chatbot where at times api call is made to external systems and the user has to wait for about a minute. I was wondering would it be possible to block/disable the input box of teams during such times.If not many users start talking to the bot when in the back-end API fetch is still running for the previous dialog,which produces undesirable results.

Any idea, disable or maybe block the user any other way???


Solution

  • There's no out of the box way to do this, that I know of, but middleware might help, like if you stored the state of the conversation, and rejected any messages earlier in the middleware pipeline during this period, or maybe sent an "error" message, something like that. Otherwise, have a look at the very latest release of bot framework (4.9), which has some better abilities for "adaptive dialogs" - see https://github.com/microsoft/botbuilder-dotnet/releases