untitled notebook

node v10.24.1
version: 1.0.1
endpointsharetweet
const express = require('express') const app = express() const port = 3000 const http = require('http'); const MessagingResponse = require('twilio').twiml.MessagingResponse; var randomWords = require('random-words'); function returnResponse() { const questionResponses = ["o ya?", "yes", "kinda", "not really :(", "sometimes", "can't really tell", "who is this", "👌", "lmao", "sorta kinda", "❤️❤️❤️❤️❤️", "🤘", "i just love hearing from you all the time this is so freaking cool", "do you?", "will you please send my best friend a photo because he doesn't believe this is your actual phone number his name is Timothy", "who is your favorite movie star", "o ya?","o ya?","o ya?","o ya?","o ya?","o ya?","o ya?","o ya?","o ya?","o ya?","yes","yesh","yesh","yesh","yesh","yesh","yesh","yesh","yesh","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish", "lmao", "lmao", "lmao", "lmao", "lmao", "lmao", "lmao", "lmao", "haha", , "haha", "haha", "haha", "hahas", "hahas", "thanks for texting","thanks for texting","thanks for texting","thanks for texting","thanks for texting","thanks for texting","thanks for texting","thanks for texting","thanks for texting us","thanks for texting","thanks for texting them","i thank you for texint me","thanks for texint me","thank for texint me","thanks for texint me","thanks for texint me", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really ok", "not really ok","not really ok","not really ok","not really ok","not really ok","sup weird ok","weird ok","you're weird ok","weird ok","weird ok","weird ok","weird ok","nbd weird ok","weird ok but thanks","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird", "sometimes maybe", "sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes kinda", "sometimes sorta", "sometimes sorta","sometimes sorta","sometimes sorta","sometimes sorta","sometimes sorta kinda lol", "sometimes sorta kinda lol","sometimes sorta kinda lol","sometimes sorta kinda lol","why sometimes sorta kinda lol","sometimes sorta kinda zzzzz","i mean sometimes sorta kinda lmao","sometimes sorta kinda lolz", "thanks for texting","thanks for texting","thanks for texting everyone so much","thanks for texting us","thanks for texting","thanks for texting them","i thank you for texint me","thanks for texint me","thank for texint me","thanks for texint me","thanks for texint me", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really ok", "not really ok","not really ok","not really ok","not really ok","not really ok","sup weird ok","weird ok","you're weird ok","weird ok","weird ok","weird ok","weird ok","nbd weird ok","weird ok but thanks","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird", "sometimes maybe", "sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes kinda", "sometimes sorta", "sometimes sorta","sometimes sorta if my momm lets me","sometimes sorta","sometimes sorta","sometimes sorta kinda lol", "sometimes sorta kinda lol","sometimes sorta kinda lol","sometimes sorta kinda lol","why sometimes sorta kinda lol","sometimes sorta kinda zzzzz","i mean sometimes sorta kinda lmao","sometimes sorta kinda lolz","thanks for texting","thanks for texting","thanks for texting","thanks for texting us","thanks for texting","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes kinda", "sometimes sorta", "sometimes sorta","sometimes sorta","sometimes sorta","sometimes sorta","sometimes sorta kinda lol", "sometimes sorta kinda lol","if my dad says no sometimes sorta kinda lol","sometimes sorta kinda lol","why sometimes sorta kinda lol","sometimes sorta kinda zzzzz","i mean sometimes sorta kinda lmao","sometimes sorta kinda lolz","thanks for texting","thanks for texting","thanks for texting","thanks for texting us","thanks for texting","thanks for texting them","i thank you for texint me","thanks for texint me","thank for texint me","thanks for texint me","thanks for texint me", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really ok", "not really ok","not really ok","not really ok","not really ok","not really ok","sup weird ok","weird ok","you're weird ok","weird ok","weird ok","weird ok","weird ok","nbd weird ok","weird ok but thanks","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird","weird", "sometimes maybe", "sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes","sometimes kinda", "sometimes sorta", "sometimes sorta","sometimes sorta","sometimes sorta","sometimes sorta","sometimes sorta kinda lol", "sometimes sorta kinda lol","sometimes sorta kinda lol","sometimes sorta kinda lol","why sometimes sorta kinda lol","sometimes sorta kinda zzzzz","i mean sometimes sorta kinda lmao","sometimes sorta kinda lolz"]; const productTimeResponses = ["lmao", "hello product time! pleaseeeee respond to me omg omg omg omg omg", "please it's my birthday please send me a picture so i know it's really you", "more conch shell please", "more conch shell please", "more conch shell please", "more conch shell please", "more conch shell please", "more conch shell please", "i really love product time and I hope that you look at my message", "my favorite part of product time is that the games are made up", "lolol this text made me so happy", "thank you so much for this awesome product time", "this was the best product time ever", "lolol and you guys think I'm just a robot", "ummmm when is clustering coming out", "I wish I had a mustache like Josh and Nate", "all your base belong to us", "product time was cool but onsite 2021 is going to be lit", "BANANA", "you're the coolest", "🔥 ytc", "shoutout to Alec's brain am i right", "AM island, may it live forever", "it was a vibe", "o ya?", "yes", "kinda", "not really :(", "sometimes", "can't really tell", "who is this", "👌", "lmao", "sorta kinda", "❤️❤️❤️❤️❤️", "🤘", "i just love hearing from you all the time this is so freaking cool", "do you?", "will you please send my best friend a photo because he doesn't believe this is your actual phone number his name is Timothy", "who is your favorite movie star", "o ya?","o ya?","o ya?","o ya?","o ya?","o ya?","o ya?","o ya?","o ya?","o ya?","yes","yesh","yesh","yesh","yesh","yesh","yesh","yesh","yesh","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish","i wish", "lmao", "lmao", "lmao", "lmao", "lmao", "lmao", "lmao", "lmao", "haha", , "haha", "haha", "haha", "hahas", "hahas", "thanks for texting","thanks for texting","thanks for texting","thanks for texting","thanks for texting","thanks for texting","thanks for texting","thanks for texting","thanks for texting us","thanks for texting","thanks for texting them","i thank you for texint me","thanks for texint me","thank for texint me","thanks for texint me","thanks for texint me", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really but ya", "not really ok", "not really ok","not really ok","not really ok","not really ok","not really ok","sup weird ok","weird ok","you're weird ok","weird ok","weird ok","weird ok","weird ok","nbd weird ok","weird ok but thanks","weird","weird","weird","weird","weird","weird","weird","weird", "stay frosty ok", "hi uncle matt", "if matt and josh's mustashes were in a duel who would win?", "it's a vibe", "how's the serenity?", "straight to the pool room", "shoutout to platform for keeping our servers running", "special thanks to web for making this interface possible", "all I know is this gon be our YEAR", "hi steph", "how about that app store tho :)", "engagement pod forever","engagement pod forever","engagement pod forever","engagement pod forever","engagement pod forever","engagement pod forever","I heard core pod has a poor cod logo lol", "I heard core pod has a poor cod logo lol", "I heard core pod has a poor cod logo lol", "I heard core pod has a poor cod logo lol", "thank you so much for this awesome product time", "fish is the coolest", "special thanks to jaywash for handling xbugs", "special thanks to jaywash for handling xbugs", "special thanks to jaywash for handling xbugs", "special thanks to jaywash for handling xbugs", "omg is this really you??","omg is this really you??","omg is this really you??","omg is this really you??","omg is this really you??","omg is this really you??", "data team unite", "when you're just trying to read your art books", "too small", "two motorcycles with a house in the middle", "I wish Lars was narrarating these messages", "shoutout to dax and virgo", "pick me pick me pick me pick me pick me", "this is fun", "bones are their money", "never had as much food as this", "underground doesn't have half as much food as this", "has this ever happened to you?", "has this ever happened to you?", "has this ever happened to you?", "has this ever happened to you?", "loe pod, they're crushing it", "inteGREATions pod, am i right"]; const shortClusters = ["clustering", "is the", "coolest thing ever"] return shortClusters[Math.floor(Math.random() * shortClusters.length)] } http.createServer(app).listen(1337, () => { console.log('Express server listening on port 1337'); }); function getRandomInt(max) { return Math.floor(Math.random() * Math.floor(max)); } function getTwilioResponse(res) { const twiml = new MessagingResponse(); const rand = getRandomInt(6) var questionCase = "" switch (rand) { case 1: questionCase = "?" break case 2: questionCase = " ❤️" break case 3: questionCase = " ☺️" break case 4: questionCase = " thanks tho" break case 5: questionCase = "" break default: break } var response = returnResponse(); twiml.message(response + questionCase); return twiml.toString(); } app.get('/', (req, res) => { const response = getTwilioResponse(res) res.writeHead(200, {'Content-Type': 'text/xml'}); res.end(response) }); app.post('/sms', (req, res) => { const response = getTwilioResponse(res) res.writeHead(200, {'Content-Type': 'text/xml'}); res.end(response) });
Loading…

no comments

    sign in to comment