This is a script picking winners for a contest where:
- every winning entry has to mention one other twitter account in a reply
- double winners are allowed
You'll need a few things installed:
- jq
- twarc
- boxes
Run npm install
before running the script.
You'll also need to chmod +x ./giveaway.sh
.
twarc needs to be configured using twarc configure
Replace the conversation ID and your Twitter handle with your data.
I’m not sure if this is a feature, but right now if a name appear in multiple tweets its odds of being picked are increased. Maybe you should extract the list of twitter handles somehow, discard duplicates, and use the remaining list in order to pick a winner ?