ISessionOptions interface

Options passed to the constructor of a session.

Properties

actions

Global actions registered for the bot.

autoBatchDelay

(Optional) time to allow between each message sent as a batch. The default value is 250ms.

connector

The connector being used for this session.

dialogArgs

(Optional) arguments to pass to the conversations initial dialog.

dialogErrorMessage

Default error message to send users when a dialog error occurs.

dialogId

Unique ID of the dialog to use when starting a new conversation with a user.

library

The bots root library of dialogs.

localizer

The localizer to use for the session.

middleware

Array of session middleware to execute prior to each request.

onSave

Function to invoke when the sessions state is saved.

onSend

Function to invoke when a batch of messages are sent.

Property Details

actions

Global actions registered for the bot.

actions?: ActionSet

Property Value

autoBatchDelay

(Optional) time to allow between each message sent as a batch. The default value is 250ms.

autoBatchDelay?: number

Property Value

number

connector

The connector being used for this session.

connector: IConnector

Property Value

dialogArgs

(Optional) arguments to pass to the conversations initial dialog.

dialogArgs?: any

Property Value

any

dialogErrorMessage

Default error message to send users when a dialog error occurs.

dialogErrorMessage?: TextOrMessageType

Property Value

dialogId

Unique ID of the dialog to use when starting a new conversation with a user.

dialogId: string

Property Value

string

library

The bots root library of dialogs.

library: Library

Property Value

localizer

The localizer to use for the session.

localizer: ILocalizer

Property Value

middleware

Array of session middleware to execute prior to each request.

middleware: ISessionMiddleware[]

Property Value

onSave

Function to invoke when the sessions state is saved.

onSave: (done: (err: Error) => void) => void

Property Value

(done: (err: Error) => void) => void

onSend

Function to invoke when a batch of messages are sent.

onSend: (messages: IMessage[], done: (err: Error, addresses?: IAddress[]) => void) => void

Property Value

(messages: IMessage[], done: (err: Error, addresses?: IAddress[]) => void) => void