@ -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
|
||||
|
9
apps/docs/docs/editor/blocks/logic/wait.md
Normal file
9
apps/docs/docs/editor/blocks/logic/wait.md
Normal 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)
|
||||
:::
|
Reference in New Issue
Block a user