次の方法で共有


TeamsFxBotCommandHandler interface

Interface for a command handler that can process command to a TeamsFx bot and return a response.

Properties

triggerPatterns

The string or regular expression patterns that can trigger this handler.

Methods

handleCommandReceived(TurnContext, CommandMessage)

Handles a bot command received activity.

Property Details

triggerPatterns

The string or regular expression patterns that can trigger this handler.

triggerPatterns: TriggerPatterns

Property Value

Method Details

handleCommandReceived(TurnContext, CommandMessage)

Handles a bot command received activity.

function handleCommandReceived(context: TurnContext, message: CommandMessage): Promise<string | void | Partial<Activity>>

Parameters

context

TurnContext

The bot context.

message
CommandMessage

The command message the user types from Teams.

Returns

Promise<string | void | Partial<Activity>>

A Promise representing an activity or text to send as the command response. Or no return value if developers want to send the response activity by themselves in this method.