Freigeben über


TeamsFxBotSsoCommandHandler interface

Interface for a command handler that can process sso 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, TeamsBotSsoPromptTokenResponse)

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, TeamsBotSsoPromptTokenResponse)

Handles a bot command received activity.

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

Parameters

context

TurnContext

The bot context.

message
CommandMessage

The command message the user types from Teams.

tokenResponse
TeamsBotSsoPromptTokenResponse

The tokenResponse which contains sso token that can be used to exchange access token for the bot.

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.