2
0

Add Wait block

Closes #142
This commit is contained in:
Baptiste Arnaud
2023-01-26 18:23:09 +01:00
parent ee864d9729
commit fa9e4b7b67
29 changed files with 621 additions and 313 deletions

View File

@ -14,14 +14,6 @@ The "Code" block allows you to execute Javascript code. If you want to set a var
window.location.reload()
```
### Wait for 3 seconds
By default, Promises will be awaited. So something like this will work:
```js
return new Promise((res) => setTimeout(res, 3000))
```
### Post a message to parent
```js

View File

@ -0,0 +1,9 @@
# Wait
The "Wait" block allows you to pause the conversation for a certain amount of seconds.
This can be useful if you want the bot to emphasize on what's been said or to wait before a redirection for example to make sure the user has read everything.
:::caution
This should be used wisely. If you want the bot to write slower or faster in a more general sense, you need to check the [Typing emulation settings](/editor/settings#typing-emulation)
:::