Search code examples
botframeworkfacebook-messenger-bot

how to turn off automatic replies?


My bot has an option "notify". I would like to stop automatic replies for that user if "notify" has been hit. Is that possible ? Any example ?

PS: I know this question is not asked properly, but i don't know where to start.


Solution

  • If you want to stop displaying in the conversation what the user selected from a set of options, you can set the CardAction type to PostBack.

    eg.

    CardAction CardButton = new CardAction()
    {
        Type = ActionTypes.PostBack,
        Title = item.ToString(),
        Value = item.ToString()
    };