elizabethsiegle / reddit_programming_bot

Slack bot made in Haskell returns a hot (trending) programming story related to what you search for (ie JS, React, Haskell, etc)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This Reddit slack bot uses the Linklater API to return a trending Reddit story (using this Reddit API) related to programming, and whatever query you pass. So, /reddit javascript would return a hot JS story from Reddit (including its link, score, and more), and /reddit tennis would return a trending story about tennis from the programming section.

To run, clone the repo, stack build, stack exec redditbot, and then open up a Ngrok tunnel. You'll need a Slack incoming webhook, too.

Slack steps:

  1. After going to your apps in the top righthand corner of https://api.slack.com, and selecting the bot you want (or creating a new one),select incoming webhooks to generate your web hook. Put this in a file called hook. webhook
  2. Right below that, you should this on the left-hand side. slashcommands

Select slash commands underneath features.

  1. Put your ngrok URL under Request URL, fill in some of the optional spots, and you're good to go! ngrokurl

You should end up with something like this: tennisfireballreddit haskellreddit

Try it out for yourself!

About

Slack bot made in Haskell returns a hot (trending) programming story related to what you search for (ie JS, React, Haskell, etc)

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 100.0%