Skip to content

elizabethsiegle/reddit_programming_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

Releases

No releases published

Packages

No packages published