Middleware class

Methods

dialogVersion(IDialogVersionOptions)

Installs a piece of middleware that manages the versioning of a bots dialogs.

firstRun(IFirstRunOptions)

Adds a first run experience to a bot. The middleware uses Session.userData to store the latest version of the first run dialog the user has been through. Incrementing the version number can force users to run back through either the full or a partial first run dialog.

sendTyping()

Installs a piece of middleware that will always send an initial typing indication to the user. This is useful because it lets you send the typing indication before any LUIS models are called. The typing indicator will only stay valid for a few seconds so if you're performing any long running operations you may want to send an additional typing indicator using session.sendTyping.

Method Details

dialogVersion(IDialogVersionOptions)

Installs a piece of middleware that manages the versioning of a bots dialogs.

static function dialogVersion(options: IDialogVersionOptions)

Parameters

options
IDialogVersionOptions

Settings to configure the bahviour of the installed middleware.

Returns

firstRun(IFirstRunOptions)

Adds a first run experience to a bot. The middleware uses Session.userData to store the latest version of the first run dialog the user has been through. Incrementing the version number can force users to run back through either the full or a partial first run dialog.

static function firstRun(options: IFirstRunOptions)

Parameters

options
IFirstRunOptions

Settings to configure the bahviour of the installed middleware.

Returns

sendTyping()

Installs a piece of middleware that will always send an initial typing indication to the user. This is useful because it lets you send the typing indication before any LUIS models are called. The typing indicator will only stay valid for a few seconds so if you're performing any long running operations you may want to send an additional typing indicator using session.sendTyping.

static function sendTyping()

Returns