https://discord.gg/botpress logo
#🤝help
Timed messages
# 🤝help
m

modern-artist-45478

06/27/2023, 5:14 AM
I made a post in feature requests about using text to speech for a guided meditation chatbot that I am hoping to create. This post I am asking if its possible to send messages on a timed schedule. I want the meditation instructions to be delivered every 2-3 minutes or so. Is this possible? TYIA
a

acceptable-kangaroo-64719

06/27/2023, 10:21 AM
A cool feature, async nodes, is in the pipeline. That will let you schedule nodes and a bunch of other cool things (so keep an eye on #1111016943370113174! ) In the meantime, you can use code to delay the next bot action. This bit will delay for 5 seconds and you can adjust as you need it:
Copy code
js
const delay = (ms) => new Promise((res) => setTimeout(res, ms))
await delay(5000)
6 Views