通过


MemoryBotStorage class

存储用户 & 会话状态数据的内存存储实现中的默认值。

方法

deleteData(IBotStorageContext)

删除给定上下文的内存中数据。

getData(IBotStorageContext, (err: Error, data: IBotStorageData) => void)

返回给定上下文的 memmory 中的数据。

saveData(IBotStorageContext, IBotStorageData, (err: Error) => void)

将数据保存到给定上下文的内存中。

方法详细信息

deleteData(IBotStorageContext)

删除给定上下文的内存中数据。

function deleteData(context: IBotStorageContext)

参数

getData(IBotStorageContext, (err: Error, data: IBotStorageData) => void)

返回给定上下文的 memmory 中的数据。

function getData(context: IBotStorageContext, callback: (err: Error, data: IBotStorageData) => void)

参数

callback

(err: Error, data: IBotStorageData) => void

saveData(IBotStorageContext, IBotStorageData, (err: Error) => void)

将数据保存到给定上下文的内存中。

function saveData(context: IBotStorageContext, data: IBotStorageData, callback?: (err: Error) => void)

参数

callback

(err: Error) => void