Search code examples
c#botframeworkmicrosoft-teamsadaptive-cards

How to restart Bot in MS Teams - Core Bot C#


Added my Bot to Teams Channel. Action Cards / Adaptive Cards aren't working like they should.

Action.submit doesn't write the value which is clicked.

Changed the Code and would like to test in MS Teams. But the proper conversation never ends. So my welcome Card doesn't appear again. Is there a function which ends my bot after e.g. 20min if is not used. And restart the conversation after clicking the chat?

I used the Core Bot Sample in C#.


Solution

  • The conversation can't be restarted in that way inside Teams, unfortunately, but there are some alternatives. Here are a few:

    1. have a colleague install the bot (also only once-off though)
    2. test in bot emulator, which gives a "restart" option
    3. detect a certain phrase from the user, like "/welcome", and resend the card in that case. This might work well if your "welcome" command can also work as a "help" command

    There are maybe some other options, but perhaps one of the above is workable?