Delay for bot messages
# 👀feature-requests
b
Create a delay function that would allow you to set a delay(5s-10s) before the bot sends the next message.
l
I double the delay request. Is it possible to implement this in a code block?
b
Tried this some time ago and at least I could not make a simple JS sleep work. Perhaps someone else has nailed this one down?
l
this code worked for me I entered this in the AI code generator: await delay 5000ms The code generated was: const delay = async (ms) => { await new Promise(resolve => setTimeout(resolve, ms)) } await delay(5000)
19 Views