Skip to content

Commit

Permalink
Merge pull request #94 from robbkidd/robb/fix-awwww
Browse files Browse the repository at this point in the history
Fix awwww
  • Loading branch information
robbkidd authored Oct 5, 2016
2 parents b964949 + 810fff2 commit 78df68c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/awwww.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ def initialize
end

def on_message(message, matches)
reddit = "http://www.reddit.com/r/aww.json"
doc = ActiveSupport::JSON.decode(open(reddit).read)
reddit = "https://www.reddit.com/r/aww.json"
doc = ActiveSupport::JSON.decode(open(reddit, "User-Agent"=>"Linkbot").read)
url = doc["data"]["children"][rand(doc["data"]["children"].length)]["data"]["url"]

# Check if it's an imgur link without an image extension
Expand Down

0 comments on commit 78df68c

Please sign in to comment.