Skip to content

Instantly share code, notes, and snippets.

@ObjectIsAdvantag
Last active September 24, 2016 13:32
Show Gist options
  • Save ObjectIsAdvantag/bde432e0608a3a8e0fc4f2cd6301bf44 to your computer and use it in GitHub Desktop.
Save ObjectIsAdvantag/bde432e0608a3a8e0fc4f2cd6301bf44 to your computer and use it in GitHub Desktop.
if (currentCall) {
choice = currentCall.initialText.toLowerCase();
if ((choice.startsWith("yes")) || (choice.startsWith("yep")) || (choice.startsWith("sure")) || (choice.startsWith("oui"))) {
say("go get some !");
}
else {
if ((choice.startsWith("no")) || (choice.startsWith("non"))) {
say("well, I am not a big coffee drinker myself neither...");
}
else {
say("sorry, I did not get your answer.");
}
}
}
else {
call(phonenumber, { "network":"SMS" });
say("what about coffee ? (yes/no)");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment