+ 1
Multiple answer to a question - Chatbot
The code by https://code.sololearn.com/WusW8nU0IBwA/#js. Line 111 '(smsg="Hello your assistant is here", k=smsg)'. How to add more than one message? For the return to be random, multiple answer to a question... Ex: >isInArray(hello, lastmsg)==true?(smsg="Hello your assistant is here", "Hello2" , "Hello3" , k=smsg): After> user: Hi bot: Hello your assistant is here user: Hi bot: Hello2 user: Hi bot: Hello3 loop Thanks!
1 Answer
+ 1
modified code, just a basic example right in place, not a fancy and integrated solution but that's the way you can adapt it easily
https://code.sololearn.com/WA2jarL6d97b/#javascript
Update: changed the code to be more generic