From 88350676689dc6cf895d0a432f040cc748762792 Mon Sep 17 00:00:00 2001 From: John Sinteur Date: Tue, 17 Apr 2018 16:59:03 +0200 Subject: [PATCH] https instead of http --- package.json | 2 +- src/pugme.coffee | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 10a4e37..9c5f12a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hubot-pugme", "description": "Pugme is the most important hubot script", - "version": "0.1.1", + "version": "0.1.2", "author": "Josh Nichols ", "license": "MIT", "keywords": "hubot, hubot-scripts, pugs", diff --git a/src/pugme.coffee b/src/pugme.coffee index 5b879b3..8386cc6 100644 --- a/src/pugme.coffee +++ b/src/pugme.coffee @@ -16,7 +16,9 @@ module.exports = (robot) -> robot.respond /pug me/i, (msg) -> msg.http("http://pugme.herokuapp.com/random") .get() (err, res, body) -> - msg.send JSON.parse(body).pug + text = JSON.parse(body).pug + text = text.replace "http:", "https:" + msg.send text robot.respond /pug bomb( (\d+))?/i, (msg) -> count = msg.match[2] || 5