ππ π€Άβπ Secret Santa SMS πβπ€Άπ π
It's the day after Thanksgiving and it is time to choose Secret Santas! You could draw names from a hat... but that is far too easy and boring!
Amaze your in-laws and relatives by delivering the pairings anonomously as automated text messages via Twilio.
$ yarn start --text yarn run v1.22.10 $ tsc index.ts && node index.js --text ππ π€Άβπ Welcome to Secret Santa! πβπ€Άπ π β¨π Sent text message to James πβ¨ β¨π Sent text message to Evan πβ¨ β¨π Sent text message to Sara πβ¨ β¨π Sent text message to Nicole πβ¨ β¨π Sent text message to Jordan πβ¨ β¨π Sent text message to Lisa πβ¨ β¨ Done in 2.94s.
Getting Started
This is a simple console app. Fork the repo and modify the list of names to match your own Secret Santa needs.
Prereqs:
- typescript
- node
First install dependencies:
Now modify the list of names:
// if you want to send messages, input names as "name:phoneNumber" let secretSantas = [ // an array is a couple, couples will not be matched ["James:+11234567890", "Lisa:+11234567890"], ["Jordan:++11234567890", "Nicole:+11234567890"], ["Evan:+11234567890", "Sara:+11234567890"], // a string is just a person, no couple/spouse exclusion rules apply "Luna:+11234567890" ];
Now you can do a dry run and print results to the console:
$ yarn start
yarn run v1.22.10
$ tsc index.ts && node index.js
ππ
π€Άβπ Welcome to Secret Santa! πβπ€Άπ
π
ππ
π€Άβπ Nicole has Luna ππ
π€Άβπ
ππ
π€Άβπ Sara has Jordan ππ
π€Άβπ
ππ
π€Άβπ Evan has Nicole ππ
π€Άβπ
ππ
π€Άβπ Luna has Lisa ππ
π€Άβπ
ππ
π€Άβπ James has Evan ππ
π€Άβπ
ππ
π€Άβπ Lisa has Sara ππ
π€Άβπ
ππ
π€Άβπ Jordan has James ππ
π€Άβπ
β¨ Done in 2.39s.
Once you're happy with your sample pairings and setup, you'll need to specify some Twilio configuration and run the program with the --text flag to send messages:
$ export TWILIO_ACCOUNT_SID="..." $ export TWILIO_AUTH_TOKEN="..." $ export TWILIO_PHONE="..." $ yarn start --text yarn run v1.22.10 $ tsc index.ts && node index.js --text ππ π€Άβπ Welcome to Secret Santa! πβπ€Άπ π β¨π Sent text message to James πβ¨ β¨π Sent text message to Evan πβ¨ β¨π Sent text message to Sara πβ¨ β¨π Sent text message to Nicole πβ¨ β¨π Sent text message to Jordan πβ¨ β¨π Sent text message to Lisa πβ¨ β¨ Done in 2.94s.
