You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to conditionally select a reply based on the result of an async macro. While this works with sync calls, I couldn't get it work with async calls.
Any ideas anyone how this could be done? Or worked around?
I created a simplified playground script as example. Entering sync 0|1|2|... works as expected, whereas async 0|1|2|... doesn't.
This is a known issue. It will require some refactoring of RiveScript to support async/await, so that an async object macro used in a condition can be called, awaited on, and then checked against the condition for truthiness.
See also issue #220 and for a lot more background, Asynchronous Support on the rivescript-js wiki.
I need to conditionally select a reply based on the result of an async macro. While this works with sync calls, I couldn't get it work with async calls.
Any ideas anyone how this could be done? Or worked around?
I created a simplified playground script as example. Entering
sync 0|1|2|...
works as expected, whereasasync 0|1|2|...
doesn't.The text was updated successfully, but these errors were encountered: