次の方法で共有


CommandBot class

A command bot for receiving commands and sending responses in Teams.

Remarks

Ensure each command should ONLY be registered with the command once, otherwise it'll cause unexpected behavior if you register the same command more than once.

Constructors

CommandBot(CloudAdapter, CommandOptions, BotSsoExecutionActivityHandler, BotSsoConfig)

Create a new instance of the CommandBot.

Methods

registerCommand(TeamsFxBotCommandHandler)

Register a command into the command bot.

registerCommands(TeamsFxBotCommandHandler[])

Register commands into the command bot.

registerSsoCommand(TeamsFxBotSsoCommandHandler)

Register a sso command into the command bot.

registerSsoCommands(TeamsFxBotSsoCommandHandler[])

Register sso commands into the command bot.

Constructor Details

CommandBot(CloudAdapter, CommandOptions, BotSsoExecutionActivityHandler, BotSsoConfig)

Create a new instance of the CommandBot.

new CommandBot(adapter: CloudAdapter, options?: CommandOptions, ssoCommandActivityHandler?: BotSsoExecutionActivityHandler, ssoConfig?: BotSsoConfig)

Parameters

adapter

CloudAdapter

The bound CloudAdapter.

options
CommandOptions

The initialize options

ssoCommandActivityHandler
BotSsoExecutionActivityHandler

SSO execution activity handler.

ssoConfig
BotSsoConfig

SSO configuration for Bot SSO.

Method Details

registerCommand(TeamsFxBotCommandHandler)

Register a command into the command bot.

function registerCommand(command: TeamsFxBotCommandHandler)

Parameters

command
TeamsFxBotCommandHandler

The command to be registered.

registerCommands(TeamsFxBotCommandHandler[])

Register commands into the command bot.

function registerCommands(commands: TeamsFxBotCommandHandler[])

Parameters

commands

TeamsFxBotCommandHandler[]

The commands to be registered.

registerSsoCommand(TeamsFxBotSsoCommandHandler)

Register a sso command into the command bot.

function registerSsoCommand(ssoCommand: TeamsFxBotSsoCommandHandler)

Parameters

ssoCommand
TeamsFxBotSsoCommandHandler

The sso command to be registered.

registerSsoCommands(TeamsFxBotSsoCommandHandler[])

Register sso commands into the command bot.

function registerSsoCommands(ssoCommands: TeamsFxBotSsoCommandHandler[])

Parameters

ssoCommands

TeamsFxBotSsoCommandHandler[]

The sso commands to be registered.