Company
Date Published
Author
Dainyl Cua
Word count
3318
Language
English
Hacker News points
None

Summary

The bot, named Bill-Bot, is a legislation tracking system that uses the LegiScan API and Twilio's Programmable Messaging API to track bills in the US Congress. The bot allows users to input keywords such as "trans" or "privacy" to search for relevant legislation related to those topics. After inputting their keyword, the user is prompted to select a state to focus on, with options including "all" to search across every state and federal level. Once the state is selected, the bot prompts the user to choose a bill category, such as privacy or trans. The user's input determines the query used to search for relevant bills in the LegiScan API. If the search results contain any bills, the bot sends a detailed message back to the user with information on those bills, including their status and action date. The bot also allows users to send a follow-up message to perform another search. To connect the bot to the internet, ngrok is used to tunnel the local server's endpoint to a forwarding URL that forwards incoming text messages to the Twilio phone number, which then forwards them to the bot's server.