I’m an avid Hacker News consumer. It’s one of the first places I go in the morning and tend to visit it multiple times a day. It might as well be my default tab (though to be fair, I have something for that). way cooler Recently, I noticed that YC has an open and so I set out to create a Slack bot (as a way to train myself for a product we’re working on). official API for Hacker News This all took just a few hours and credit should all go to Slack’s great that makes it so you don’t need to run a bot process at all times and enabled me to use alongside and put together a pretty decent experience. Events API StdLib Botkit Functionality The bot currently supports almost all the public functionality of the API (except for users). Here’s how to use them: Multiple Queries You can get the bot to get you multiple post types all at once by asking for the different post types right in one message! @hackernewsbot get me jobs and top stories Querying multiple post types The bot cycles through all the commands that it sees and performs all of them and concatenates them in the same order. Since I asked it to , it’s showing the job postings first (since it showed up first in my text) and the top stories afterwards. get me jobs and top stories Top Stories You can get the top stories (equivalent of going to the front page of ). HN @hackernewsbot top stories Top Stories on Hacker News It will show you the top stories whenever you say anything that contains the word . top New Stories You can get the latest posts (equivalent of posts in on HN). /newest @hackernewsbot new stories New Stories on Hacker News It will show you the newest posts whenever you mention anything with the word in it. new Show HNs You can get the latest Show HN posts (equivalent of on HN). /show @hackernewsbot Show HNs Show HN stories on Hacker News It’ll get you the latest Show HNs whenever you mention the word . show Job Posts It can show you the latest job postings on HN (equivalent of on HN) /jobs @hackernewsbot jobs Job postings on Hacker News In the future, I’d like it support fetching posts by specific users (which the API supports) and potentially posting automatic notifications whenever a new post hits the front-page! If you just want to install it to your Slack group, then . go here If you want to read the code, . here it is
Share Your Thoughts