Jump to content

Auto chat responder


sirskitzo

Recommended Posts

  • 1 month later...
On 2/15/2018 at 12:11 PM, Juggles said:

Bots aren't human, they can't  know if "what ya doing" and "what r u doing?" are the same thing. 

You have to program both of them so it knows 

Wrong.

If (message.contains("what") || message.contains("wat")) {

     phraseCount++;

}

if (message.contains(" r ") || message.contains(" are ")) {

  phraseCount++;

}

if (message.contains(" you ") || message.contains(" ya ") || message.contains(" u ")) {

    phraseCount++;

}

if (message.contains(" doin") {//lack of space after would also cover "doing"

phraseCount++;

}



if (phraseCount >= 3) {//incase they just say "wat u doin"

  //ACTION HERE

}

 

Obviously there's a billion ways better to carry this function out but i'd thought to keep it simple to explain the point i guess.

Edited by I am not a
  • Like 1
Link to comment
Share on other sites

  • Night locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...