Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function readA(a) {var punctuation=a.replace(/[.,\/#!$%\^&\?”’@*;:{}=\-_`~()]/g,"");var capital=punctuation.toUpperCase();var makeString=capital.split(" ");return makeString};
- var b=readA(a);
- var greeting=["HI","HEY","HELLO"];
- var age=["AGE","OLD"];
- var birthday=["BIRTHDAY","BDAY"];
- var time=["TIME"];
- var live=["LIVE","STATE","FROM","LOCATION","LOCATED"];
- var game=["GAME","GAMES","VIDEO"];
- function testGreeting(b) {return greeting.some(item => b.includes(item))};
- function testAge(b) {return age.some(item => b.includes(item))};
- function testBirthday(b) {return birthday.some(item => b.includes(item))};
- function testTime(b) {return time.some(item => b.includes(item))};
- function testLive(b) {return live.some(item => b.includes(item))};
- function testGame(b) {return game.some(item => b.includes(item))};
- testGame(b)?"Pinata mainly plays OSRS.":
- testTime(b)?"It is currently "+t+" where Pinata lives.":
- testLive(b)?"Pinata lives in his moms house.":
- testBirthday(b)?"Pinata’s birthday is a secret."
- testAge(b)?"Pinata is currently 26 years old.":
- testGreeting(b)?"Hello, I’m a command designed to answer your questions about Pinata.":
- "”"+a+"” has no recognizable keywords. Please reformat your question or ask Pinata directly."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement