Botkit: Cannot set timeout on a conversation

Created on 18 Aug 2016  路  4Comments  路  Source: howdyai/botkit

I cannot find out how to set a timeout on a conversation. See issue #205.

help wanted

All 4 comments

What error are you seeing when you try? Have you tried @anonrig 's suggestion?

It wasnt clear to me until I saw some examples in the slack community.

For others - use convo.task.timeout=900000 (in this case 15min) in your code just after bot.startConversation to set a timeout.

I believe it's supposed to be timeLimit instead of timeout:
convo.task.timeLimit = 900000

I agree with @noam3127, if you search for timeout in the botkit source code you get nothing except for comments, but there is one line that has timeLimit (CoreBot.js Line 388):

if (this.task.timeLimit && // has a timelimit
(duration > this.task.timeLimit) && // timelimit is up
(lastActive > this.task.timeLimit) // nobody has typed for 60 seconds at least

After testing i see that setting convo.task.timeLimit = 1000 does in fact stop the conversation (in this case after 1 second of inactivity). It looks like this is the only way to do it. Please please please document this or add a real method to do this. Timelimits on conversations are really needed, especially if you are doing interactive button conversations.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dfischer picture dfischer  路  4Comments

abinashmohanty picture abinashmohanty  路  4Comments

simpixelated picture simpixelated  路  3Comments

imjul1an picture imjul1an  路  3Comments

seriousssam picture seriousssam  路  3Comments