1

我正在使用机器人框架来构建一个测验机器人,如果他们在 2 分钟内不活动,我希望这个人从机器人那里得到一条消息。当我尝试

bot.dialog('/', [(session)=>{
    session.dialogData.inactive = setTimeout(()=>{
        session.send('You there?')
    },30000)
}])

它给了我这个错误

TypeError: Converting circular structure to JSON
    at Object.stringify (native)
    at addWrite (D:\bots\zupquiz\node_modules\botbuilder\lib\bots\ChatConnector.js:261:29)
    at ChatConnector.saveData (D:\bots\zupquiz\node_modules\botbuilder\lib\bots\ChatConnector.js:276:21)
    at D:\bots\zupquiz\node_modules\botbuilder\lib\bots\UniversalBot.js:405:21
    at UniversalBot.tryCatch (D:\bots\zupquiz\node_modules\botbuilder\lib\bots\UniversalBot.js:425:13)
    at UniversalBot.saveStorageData (D:\bots\zupquiz\node_modules\botbuilder\lib\bots\UniversalBot.js:402:14)
    at Object.onSave (D:\bots\zupquiz\node_modules\botbuilder\lib\bots\UniversalBot.js:266:27)
    at Session.sendBatch (D:\bots\zupquiz\node_modules\botbuilder\lib\Session.js:381:22)
    at Timeout.<anonymous> (D:\bots\zupquiz\node_modules\botbuilder\lib\Session.js:513:23)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)
4

0 回答 0