Freigeben über


MessageExtension.OnCardButtonClicked(CardButtonClickedHandler) Method

Definition

Registers a handler that implements the logic when a user has clicked on a button in a Message Extension card.

public Microsoft.Agents.Builder.App.AgentApplication OnCardButtonClicked(Microsoft.Agents.Extensions.Teams.App.MessageExtensions.CardButtonClickedHandler handler);
member this.OnCardButtonClicked : Microsoft.Agents.Extensions.Teams.App.MessageExtensions.CardButtonClickedHandler -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnCardButtonClicked (handler As CardButtonClickedHandler) As AgentApplication

Parameters

handler
CardButtonClickedHandler

Function to call when the event is triggered.

Returns

The application instance for chaining purposes.

Remarks

The `composeExtension/onCardButtonClicked` INVOKE activity does not contain any sort of command ID, so only a single select item handler can be registered. Developers will need to include a type name of some sort in the preview item they return if they need to support multiple select item handlers.

Applies to