ISessionOptions interface
Options passed to the constructor of a session.
Properties
actions | Global actions registered for the bot. |
auto |
(Optional) time to allow between each message sent as a batch. The default value is 250ms. |
connector | The connector being used for this session. |
dialog |
(Optional) arguments to pass to the conversations initial dialog. |
dialog |
Default error message to send users when a dialog error occurs. |
dialog |
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. |
on |
Function to invoke when the sessions state is saved. |
on |
Function to invoke when a batch of messages are sent. |
Property Details
actions
autoBatchDelay
(Optional) time to allow between each message sent as a batch. The default value is 250ms.
autoBatchDelay?: number
Property Value
number
connector
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
localizer
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