aichaos / rivescript-js

A RiveScript interpreter for JavaScript. RiveScript is a scripting language for chatterbots.
https://www.rivescript.com/
MIT License
377 stars 144 forks source link

Call Typescript functions via object macro #352

Closed ArkasDev closed 4 years ago

ArkasDev commented 4 years ago

I want to integrate Rivescript into my Angular webapp. In addition to the chatbot conversation, the bot should also execute logic based on the conversation. I have seen that there is a macro function implemented in Rivescript that allows you to execute Javascript. Is it possible to call an Angular service via object macro?

ArkasDev commented 4 years ago

I just found this example to implement it. https://github.com/aichaos/rivescript-js/tree/master/eg/reply-async