Ask question after X minutes of conversation

Hi,

I was wondering whether it is possible to send the user a question after a pre-specified number of minutes? The user should ask the bot some questions (which I have already defined), and after 3 minutes of conversation, the bot should ask the same question to every user.

Thanks,
Aline

Hey @alinewaeber !

Are you using Botpress on the web channel? Or another channel (Facebook Messenger, Telegram, etc)?

Hi @spgin!

I am using Botpress on the web channel! Do you have an idea as to how this could be solved?

The general idea would be this:

window.addEventListener('message', function(event) {
   // clear your setTimeout handle
})

to detect incoming messages

Hope this helps!