ORESTAR bot is a Slack bot that delivers Oregon campaign finance data from the ORESTAR database. ORESTAR bot interfaces with HackOregon's Behind The Curtain API. You can learn more about the API here. ORESTAR bots is built with Botkit.
- Download or clone ORESTAR bot:
git clone https://github.com/JasonBernert/orestar-bot.git
- Install dependencies:
npm install
- Create a new bot integration for your team here. Though you can name the bot whatever you'd like,
@orestar
will be the name of the bot in this documentation. - Copy the API token that Slack gives you for your new bot.
- Run ORESTAR bot using the token you just copied:
token=REPLACE_THIS_WITH_YOUR_TOKEN node orestar_bot.js
- ORESTAR bot should be online! Within Slack, send it a quick direct message to say
hello
. It should say hello back!
Type: /invite @orestar
to invite orestar bot into a channel.
ORESTAR bot responds to the following phrases:
Help
return a list of phrases and responses.
-
Hello
will greet you with your name, if it has a nickname saved for your user. -
Call me
will save a nickname to user name. -
What is my name?
will respond with user's nickname. -
Who are you?
will respond uptime and hostname data. -
Shutdown
will shut down the bot.
-
top individuals
gets the total contributions from the top 5 contributing individuals in all of Oregon. -
top business
gets the total contributions from the top 5 contributing businesses in all of Oregon. -
top committees
gets the total contributions from the top 2 contributing committees in all of Oregon. -
search [candidate name]
gets candidate info.
More coming soon...