ISessionOptions interface
傳遞至會話建構函式的選項。
屬性
| actions | 為 Bot 註冊的全域動作。 |
| auto |
(選擇性) 允許每個以批次傳送的訊息之間的時間。 預設值為 250 毫秒。 |
| connector | 用於此工作階段的連接器。 |
| dialog |
(選擇性) 自變數,以傳遞至交談初始對話。 |
| dialog |
發生對話框錯誤時傳送使用者的預設錯誤訊息。 |
| dialog |
開始與用戶進行新交談時,要使用的對話框唯一標識符。 |
| library | 對話的 Bot 根連結庫。 |
| localizer | 要用於工作階段的當地語系化工具。 |
| middleware | 每個要求之前要執行的會話中間件數位。 |
| on |
儲存工作階段狀態時要叫用的函式。 |
| on |
傳送訊息批次時要叫用的函式。 |
屬性詳細資料
actions
autoBatchDelay
(選擇性) 允許每個以批次傳送的訊息之間的時間。 預設值為 250 毫秒。
autoBatchDelay?: number
屬性值
number
connector
dialogArgs
(選擇性) 自變數,以傳遞至交談初始對話。
dialogArgs?: any
屬性值
any
dialogErrorMessage
dialogId
開始與用戶進行新交談時,要使用的對話框唯一標識符。
dialogId: string
屬性值
string
library
localizer
middleware
onSave
儲存工作階段狀態時要叫用的函式。
onSave: (done: (err: Error) => void) => void
屬性值
(done: (err: Error) => void) => void
onSend
傳送訊息批次時要叫用的函式。
onSend: (messages: IMessage[], done: (err: Error, addresses?: IAddress[]) => void) => void
屬性值
(messages: IMessage[], done: (err: Error, addresses?: IAddress[]) => void) => void