+ 9
I need help with my chatbot [not answered yet!]
I'm creating a chatbot using JavaScript and now I've come to the point of adding input and the corresponding reaction from the bot. This is a lot of work and it's easy to miss something if I do this all by myself. So please leave a comment with an input and the corresponding answer. If you have any questions feel free to ask. The code is called Chatbot [work in progress]
1 Answer
+ 3
hyy this is for you dear :
if(this.match('(hi|hello|hey|hola|howdy)(\\s|!|\\.|$)'))
return "um... hi?";
if(this.match('what[^ ]* up') || this.match('sup') || this.match('how are you'))
return "heyyy?";
if(this.match('^no+(\\s|!|\\.|$)'))
return "don't be such a negative :(";