Last active
December 16, 2015 04:29
-
-
Save omatt/5377166 to your computer and use it in GitHub Desktop.
Tropo Sample storing online accounts user data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var askAccount = ask("What's the online account details that you want to know?You can select Facebook or Twiiter", { | |
choices: "facebook, twitter, github", | |
timeout: 20.0, | |
attempts: 3, | |
onBadChoice: function(askAccount) { | |
say("I'm sorry, I didn't understand that. You can select facebook or twitter."); | |
}, | |
onChoice: function(askAccount) { | |
if(askAccount.value == "facebook"){ | |
say("Your username is [email protected]"); | |
var askConfirm = ask("Is this your account? Yes or No.",{ | |
choices: "yes, no" | |
}); | |
if(askConfirm.value == "yes") | |
say("Your Facebook Password is... Password1234567T"); | |
else if(askConfirm.value == "no") | |
say("Thank you for using our app."); | |
} | |
if(askAccount.value == "twitter"){ | |
say("Your username is [email protected]"); | |
var askConfirm = ask("Is this your account? Yes or No.",{ | |
choices: "yes, no" | |
}); | |
if(askConfirm.value == "yes") | |
say("Your Twitter Password is... Password1234567T"); | |
else if(askConfirm.value == "no") | |
say("Thank you for using our app."); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment