From 77d243dcef0cef464bcd6f54891aa31505b3f1c1 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sun, 27 Mar 2016 13:54:06 -0500 Subject: [PATCH 01/29] Update bot.js --- bot.js | 188 +++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 142 insertions(+), 46 deletions(-) diff --git a/bot.js b/bot.js index d04b04016..5142fc145 100644 --- a/bot.js +++ b/bot.js @@ -4,54 +4,150 @@ var cool = require('cool-ascii-faces'); var botID = process.env.BOT_ID; function respond() { - var request = JSON.parse(this.req.chunks[0]), - botRegex = /^\/cool guy$/; - - if(request.text && botRegex.test(request.text)) { - this.res.writeHead(200); - postMessage(); - this.res.end(); - } else { - console.log("don't care"); - this.res.writeHead(200); - this.res.end(); - } +  var request = JSON.parse(this.req.chunks[0]), +      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexSalt = /^\/salt/;botRegexRules = /^\/rules/ +      botRegexAd=/^\/advance/;botRegexGTA = /^\/gta/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/; +      botRegexP = /^\/PDL/i;  botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; +      botRegexSiege = /^\/siege/ +      siege1 = 'https://i.groupme.com/350x419.png.adc8c73a6c1547e0a9e04320296329f8'; siege2 = 'https://i.groupme.com/1279x752.jpeg.aa5d0401e0df495bba4b4e09dc5a6bd7' +      siege3 = 'https://i.groupme.com/960x960.png.006e180e05d841c6a2962e844bf1e6fd'; +  var teamAb = ["NE","NO","ARI","PHI","CLE","TEN","OAK","DAL","IND","SEA","CIN","PIT","JAC" +                ,"BAL","SD","DEN","MIN","ATL","KC","NYG","GB","DET","HOU","STL","CHI","CAR", +                "MIA","BUF","SF","WAS","NYJ","TB"] +  if(request.text && botRegex.test(request.text)) { +    this.res.writeHead(200); +    postMessage(cool()); +    this.res.end(); +  } +  else if(request.text && botRegexDL.test(request.text)) { +    this.res.writeHead(200); +    postMessage("http://daddyleagues.com/PMC/team/"+request.text.substring(5,8)+"/depthchart"); +    this.res.end(); +  } +  else if(request.text && botRegexSalt.test(request.text)) { +    this.res.writeHead(200); +    postMessage("https://i.imgur.com/B5BSVqH.png"); +    this.res.end(); +  } +  else if(request.text && botRegexAd.test(request.text)) { +    this.res.writeHead(200); +    postMessage("http://www.hackcollege.com/wp-content/uploads/2013/02/kno_advance.jpg"); +    this.res.end(); +  } +  else if(request.text && botRegexRules.test(request.text)) { +    this.res.writeHead(200); +    postMessage("https://docs.google.com/document/d/1hSuEG7oplnx4IX6HGsMOjsWb9TCqC4-F1NLjuBz5PCM/edit"); +    this.res.end(); +  } +  else if(request.text && botRegexGTA.test(request.text)) { +    this.res.writeHead(200); +    postMessage("https://i.groupme.com/220x147.jpeg.a2dd2add32b14fff9e329535186d793c.large"); +    this.res.end(); +  } +  else if(request.text && botRegexSC.test(request.text)) { +    this.res.writeHead(200); +    postMessage("http://daddyleagues.com/PMC/team/"+request.text.substring(5,8)+"/schedule"); +    this.res.end(); +  } +  else if(request.text && botRegexP.test(request.text)) { +    this.res.writeHead(200); +    var req = request.text.substring(5,request.text.length); +    var rep = req.replace(/ /,"+"); +    postMessage("http://daddyleagues.com/PMC/players?name="+rep+"&position=all&team=all"); +    this.res.end(); +  }   + +  else if(request.text && botRegexTw.test(request.text)) { +    this.res.writeHead(200); +    postMessage("http://www.twitch.tv/"+request.text.substring(8,request.text.length)); +    this.res.end(); +  } +  else if(request.text && botRegexSb.test(request.text)) { +    this.res.writeHead(200); +    postMessage("http://www.reddit.com/r/maddenall32"); +    this.res.end(); +  } +  else if(request.text && botRegexSh.test(request.text)) { +    this.res.writeHead(200); +    postMessage("¯\\_(ツ)_/¯"); +    this.res.end(); +  } +  else if(request.text && botRegexWk.test(request.text)) { +    this.res.writeHead(200); +    postMessage("https://docs.google.com/spreadsheets/d/1kJqQWCq3RKiTrd4f71FFNKr-Y0ppJzjk0fSF0rP6Bto/edit?usp=sharing"); +    this.res.end(); +  } +  else if(request.text && botODB.test(request.text)) { +    this.res.writeHead(200); +    postMessage("OBJ*"); +    this.res.end(); +  } +  else if(request.text && botDuck.test(request.text)) { +    this.res.writeHead(200); +    postMessage("http://media3.giphy.com/media/YCseTHF2I6CCA/giphy.gif"); +    this.res.end(); +  } +  else if(request.text && botRegexCC.test(request.text)) { +    this.res.writeHead(200); +    postMessage("https://i.groupme.com/851x1184.jpeg.330228901f684b0cb46cd1cef6953923"); +    this.res.end(); +  } +  else if(request.text && botRegexSiege.test(request.text)) { +    this.res.writeHead(200); +    if(0.6 >= Math.random() > 0.3) +      postMessage(siege1); +    else if(Math.random() >0.6) +      postMessage(siege3) +    else +      postMessage(siege2); +    this.res.end(); +  } +   +  else { +    console.log("don't care"); +    this.res.writeHead(200); +    this.res.end(); +  } +} + +function postMessage(response) { +  var botResponse,options, body, botReq; + +  botResponse = response + +  options = { +    hostname: 'api.groupme.com', +    path: '/v3/bots/post', +    method: 'POST' +  }; + +  body = { +    "bot_id" : botID, +    "text" : botResponse +  }; + +  console.log('sending ' + botResponse + ' to ' + botID); + +  botReq = HTTPS.request(options, function(res) { +      if(res.statusCode == 202) { +        //neat +      } else { +        console.log('rejecting bad status code ' + res.statusCode); +      } +  }); + +  botReq.on('error', function(err) { +    console.log('error posting message '  + JSON.stringify(err)); +  }); +  botReq.on('timeout', function(err) { +    console.log('timeout posting message '  + JSON.stringify(err)); +  }); +  botReq.end(JSON.stringify(body)); } -function postMessage() { - var botResponse, options, body, botReq; - - botResponse = cool(); - - options = { - hostname: 'api.groupme.com', - path: '/v3/bots/post', - method: 'POST' - }; - - body = { - "bot_id" : botID, - "text" : botResponse - }; - - console.log('sending ' + botResponse + ' to ' + botID); - - botReq = HTTPS.request(options, function(res) { - if(res.statusCode == 202) { - //neat - } else { - console.log('rejecting bad status code ' + res.statusCode); - } - }); - - botReq.on('error', function(err) { - console.log('error posting message ' + JSON.stringify(err)); - }); - botReq.on('timeout', function(err) { - console.log('timeout posting message ' + JSON.stringify(err)); - }); - botReq.end(JSON.stringify(body)); +function getRandomInt(min, max) { +  return Math.floor(Math.random() * (max - min)) + min; } -exports.respond = respond; \ No newline at end of file +exports.respond = respond; From bfe34443cc3e20755131f6e209f8d48caa9f97c9 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Fri, 19 Aug 2016 16:01:12 -0500 Subject: [PATCH 02/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 5142fc145..61766b582 100644 --- a/bot.js +++ b/bot.js @@ -21,7 +21,7 @@ function respond() {   }   else if(request.text && botRegexDL.test(request.text)) {     this.res.writeHead(200); -    postMessage("http://daddyleagues.com/PMC/team/"+request.text.substring(5,8)+"/depthchart"); +    postMessage("http://daddyleagues.com/nlb/team/"+request.text.substring(5,8)+"/depthchart");     this.res.end();   }   else if(request.text && botRegexSalt.test(request.text)) { From d26fa7e0b4f6c40c6b6c7f380816531bdbe1ec24 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Fri, 19 Aug 2016 16:02:12 -0500 Subject: [PATCH 03/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 61766b582..4ddaaa46d 100644 --- a/bot.js +++ b/bot.js @@ -21,7 +21,7 @@ function respond() {   }   else if(request.text && botRegexDL.test(request.text)) {     this.res.writeHead(200); -    postMessage("http://daddyleagues.com/nlb/team/"+request.text.substring(5,8)+"/depthchart"); +    postMessage("http://daddyleagues.com/NLB/team/"+request.text.substring(5,8)+"/depthchart");     this.res.end();   }   else if(request.text && botRegexSalt.test(request.text)) { From 90a1366921551324452a52a68a72494aff23a23d Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Fri, 19 Aug 2016 16:53:49 -0500 Subject: [PATCH 04/29] Update bot.js --- bot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.js b/bot.js index 4ddaaa46d..ed33b4607 100644 --- a/bot.js +++ b/bot.js @@ -46,14 +46,14 @@ function respond() {   }   else if(request.text && botRegexSC.test(request.text)) {     this.res.writeHead(200); -    postMessage("http://daddyleagues.com/PMC/team/"+request.text.substring(5,8)+"/schedule"); +    postMessage("http://daddyleagues.com/NLB/team/"+request.text.substring(5,8)+"/schedule");     this.res.end();   }   else if(request.text && botRegexP.test(request.text)) {     this.res.writeHead(200);     var req = request.text.substring(5,request.text.length);     var rep = req.replace(/ /,"+"); -    postMessage("http://daddyleagues.com/PMC/players?name="+rep+"&position=all&team=all"); +    postMessage("http://daddyleagues.com/NLB/players?name="+rep+"&position=all&team=all");     this.res.end();   }   From e7f5cde04a407b9afa716e743188924751dcd290 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Fri, 19 Aug 2016 16:58:45 -0500 Subject: [PATCH 05/29] Update bot.js --- bot.js | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/bot.js b/bot.js index ed33b4607..4e58164ab 100644 --- a/bot.js +++ b/bot.js @@ -5,7 +5,7 @@ var botID = process.env.BOT_ID; function respond() {   var request = JSON.parse(this.req.chunks[0]), -      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexSalt = /^\/salt/;botRegexRules = /^\/rules/ +      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/;botRegexSquirt = /^\/squirt/;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegexjj = /^\/jj/;botRegexRules = /^\/rules/;       botRegexAd=/^\/advance/;botRegexGTA = /^\/gta/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/;       botRegexP = /^\/PDL/i;  botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/;       botRegexSiege = /^\/siege/ @@ -24,9 +24,29 @@ function respond() {     postMessage("http://daddyleagues.com/NLB/team/"+request.text.substring(5,8)+"/depthchart");     this.res.end();   } -  else if(request.text && botRegexSalt.test(request.text)) { +  else if(request.text && botRegexHarper.test(request.text)) {     this.res.writeHead(200); -    postMessage("https://i.imgur.com/B5BSVqH.png"); +    postMessage("http://36.media.tumblr.com/06086ac9d889c7729d928d4aa5d1405b/tumblr_nk8g0fFErk1s2yr14o1_1280.jpg"); +    this.res.end(); +  } +    else if(request.text && botRegexSquirt.test(request.text)) { +    this.res.writeHead(200); +    postMessage("https://media.giphy.com/media/3oEduY8Kh1AoOWUBnW/giphy.gif"); +    this.res.end(); +  } +  else if(request.text && botRegexBurn.test(request.text)) { +    this.res.writeHead(200); +    postMessage("http://45.media.tumblr.com/tumblr_ly1efoFthg1r4ghkoo1_500.gif"); +    this.res.end(); +  } +  else if(request.text && botRegexTom.test(request.text)) { +    this.res.writeHead(200); +    postMessage("https://media.giphy.com/media/Nccs0rNvVC1nG/giphy.gif"); +    this.res.end(); +  } +  else if(request.text && botRegexjj.test(request.text)) { +    this.res.writeHead(200); +    postMessage("https://media.giphy.com/media/ZQnr4SydezPLG/giphy.gif");     this.res.end();   }   else if(request.text && botRegexAd.test(request.text)) { @@ -36,7 +56,7 @@ function respond() {   }   else if(request.text && botRegexRules.test(request.text)) {     this.res.writeHead(200); -    postMessage("https://docs.google.com/document/d/1hSuEG7oplnx4IX6HGsMOjsWb9TCqC4-F1NLjuBz5PCM/edit"); +    postMessage("http://daddyleagues.com/NLB/rules");     this.res.end();   }   else if(request.text && botRegexGTA.test(request.text)) { From 287a85cdc609d3f087d45a6dedaabc79c1fc85b0 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Fri, 19 Aug 2016 18:27:14 -0500 Subject: [PATCH 06/29] Update bot.js --- bot.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index 4e58164ab..6d8bf6b3c 100644 --- a/bot.js +++ b/bot.js @@ -5,7 +5,7 @@ var botID = process.env.BOT_ID; function respond() {   var request = JSON.parse(this.req.chunks[0]), -      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/;botRegexSquirt = /^\/squirt/;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegexjj = /^\/jj/;botRegexRules = /^\/rules/; +      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/;botRegexWatt = /^\/watt/;botRegexReid = /^\/reid;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegexjj = /^\/jj/;botRegexRules = /^\/rules/;       botRegexAd=/^\/advance/;botRegexGTA = /^\/gta/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/;       botRegexP = /^\/PDL/i;  botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/;       botRegexSiege = /^\/siege/ @@ -29,11 +29,16 @@ function respond() {     postMessage("http://36.media.tumblr.com/06086ac9d889c7729d928d4aa5d1405b/tumblr_nk8g0fFErk1s2yr14o1_1280.jpg");     this.res.end();   } -    else if(request.text && botRegexSquirt.test(request.text)) { +    else if(request.text && botRegexWatt.test(request.text)) {     this.res.writeHead(200);     postMessage("https://media.giphy.com/media/3oEduY8Kh1AoOWUBnW/giphy.gif");     this.res.end(); -  } +  } +    else if(request.text && botRegexReid.test(request.text)) { +    this.res.writeHead(200); +    postMessage("http://apornpictures.com/wp-content/uploads/2016/02/Riley-Reid.jpg"); +    this.res.end(); +  }   else if(request.text && botRegexBurn.test(request.text)) {     this.res.writeHead(200);     postMessage("http://45.media.tumblr.com/tumblr_ly1efoFthg1r4ghkoo1_500.gif"); From 69037a2c651999e07ea428bf91c5331ad089d85b Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Fri, 19 Aug 2016 18:30:50 -0500 Subject: [PATCH 07/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 6d8bf6b3c..f5d4d5583 100644 --- a/bot.js +++ b/bot.js @@ -36,7 +36,7 @@ function respond() {   }     else if(request.text && botRegexReid.test(request.text)) {     this.res.writeHead(200); -    postMessage("http://apornpictures.com/wp-content/uploads/2016/02/Riley-Reid.jpg"); +    postMessage("https://media4.giphy.com/media/g9RplpKZNkT5u/giphy.gif");     this.res.end();   }   else if(request.text && botRegexBurn.test(request.text)) { From cca076f252a289fe9f35379a36286e6cf88b3dc4 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Fri, 19 Aug 2016 18:35:15 -0500 Subject: [PATCH 08/29] Update bot.js --- bot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.js b/bot.js index f5d4d5583..0f3a34b49 100644 --- a/bot.js +++ b/bot.js @@ -5,7 +5,8 @@ var botID = process.env.BOT_ID; function respond() {   var request = JSON.parse(this.req.chunks[0]), -      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/;botRegexWatt = /^\/watt/;botRegexReid = /^\/reid;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegexjj = /^\/jj/;botRegexRules = /^\/rules/; +      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/;botRegexWatt = /^\/watt/; +botRegexReid = /^\/reid;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegexjj = /^\/jj/;botRegexRules = /^\/rules/;       botRegexAd=/^\/advance/;botRegexGTA = /^\/gta/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/;       botRegexP = /^\/PDL/i;  botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/;       botRegexSiege = /^\/siege/ From 1eae3f2d6b8d62c6bae80b1c88074c36d863df8e Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Thu, 13 Oct 2016 21:23:44 -0500 Subject: [PATCH 09/29] Update bot.js --- bot.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index 0f3a34b49..7d382aa96 100644 --- a/bot.js +++ b/bot.js @@ -5,7 +5,7 @@ var botID = process.env.BOT_ID; function respond() {   var request = JSON.parse(this.req.chunks[0]), -      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/;botRegexWatt = /^\/watt/; +      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/;botRegexFeeney = /^\/feeney/; botRegexReid = /^\/reid;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegexjj = /^\/jj/;botRegexRules = /^\/rules/;       botRegexAd=/^\/advance/;botRegexGTA = /^\/gta/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/;       botRegexP = /^\/PDL/i;  botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; @@ -30,9 +30,10 @@ botRegexReid = /^\/reid;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegex     postMessage("http://36.media.tumblr.com/06086ac9d889c7729d928d4aa5d1405b/tumblr_nk8g0fFErk1s2yr14o1_1280.jpg");     this.res.end();   } -    else if(request.text && botRegexWatt.test(request.text)) { +    else if(request.text && botRegexFeeney.test(request.text)) {     this.res.writeHead(200); -    postMessage("https://media.giphy.com/media/3oEduY8Kh1AoOWUBnW/giphy.gif"); + +postMessage("https://media1.giphy.com/media/RdsvvZXIzBgNq/giphy.gif");     this.res.end();   }     else if(request.text && botRegexReid.test(request.text)) { From 73157edafad58cfb8092c2b716ddaaf08e65ec1b Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Thu, 13 Oct 2016 21:28:24 -0500 Subject: [PATCH 10/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 7d382aa96..3adae68ea 100644 --- a/bot.js +++ b/bot.js @@ -5,7 +5,7 @@ var botID = process.env.BOT_ID; function respond() {   var request = JSON.parse(this.req.chunks[0]), -      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/;botRegexFeeney = /^\/feeney/; +      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/;botRegexFeeney =/^\/feeney/; botRegexReid = /^\/reid;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegexjj = /^\/jj/;botRegexRules = /^\/rules/;       botRegexAd=/^\/advance/;botRegexGTA = /^\/gta/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/;       botRegexP = /^\/PDL/i;  botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; From f89acabb726e26aec677d3476953d131e83bea87 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Thu, 13 Oct 2016 21:31:55 -0500 Subject: [PATCH 11/29] Update bot.js --- bot.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/bot.js b/bot.js index 3adae68ea..1b0ca72f9 100644 --- a/bot.js +++ b/bot.js @@ -5,7 +5,7 @@ var botID = process.env.BOT_ID; function respond() {   var request = JSON.parse(this.req.chunks[0]), -      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/;botRegexFeeney =/^\/feeney/; +      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/; botRegexReid = /^\/reid;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegexjj = /^\/jj/;botRegexRules = /^\/rules/;       botRegexAd=/^\/advance/;botRegexGTA = /^\/gta/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/;       botRegexP = /^\/PDL/i;  botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; @@ -29,12 +29,6 @@ botRegexReid = /^\/reid;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegex     this.res.writeHead(200);     postMessage("http://36.media.tumblr.com/06086ac9d889c7729d928d4aa5d1405b/tumblr_nk8g0fFErk1s2yr14o1_1280.jpg");     this.res.end(); -  } -    else if(request.text && botRegexFeeney.test(request.text)) { -    this.res.writeHead(200); - -postMessage("https://media1.giphy.com/media/RdsvvZXIzBgNq/giphy.gif"); -    this.res.end();   }     else if(request.text && botRegexReid.test(request.text)) {     this.res.writeHead(200); From b6e2331ecdccb7fe1282c6b827d688f5d1160637 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sat, 15 Oct 2016 01:12:56 -0500 Subject: [PATCH 12/29] Update bot.js --- bot.js | 350 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 199 insertions(+), 151 deletions(-) diff --git a/bot.js b/bot.js index 1b0ca72f9..f3744e512 100644 --- a/bot.js +++ b/bot.js @@ -4,170 +4,218 @@ var cool = require('cool-ascii-faces'); var botID = process.env.BOT_ID; function respond() { -  var request = JSON.parse(this.req.chunks[0]), -      botRegex = /^\/cool guy/;  botRegexDL = /^\/DDL/i;botRegexHarper = /^\/Harper/; -botRegexReid = /^\/reid;botRegexBurn = /^\/burn/;botRegexTom = /^\/tom/;botRegexjj = /^\/jj/;botRegexRules = /^\/rules/; -      botRegexAd=/^\/advance/;botRegexGTA = /^\/gta/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/; -      botRegexP = /^\/PDL/i;  botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; -      botRegexSiege = /^\/siege/ -      siege1 = 'https://i.groupme.com/350x419.png.adc8c73a6c1547e0a9e04320296329f8'; siege2 = 'https://i.groupme.com/1279x752.jpeg.aa5d0401e0df495bba4b4e09dc5a6bd7' -      siege3 = 'https://i.groupme.com/960x960.png.006e180e05d841c6a2962e844bf1e6fd'; -  var teamAb = ["NE","NO","ARI","PHI","CLE","TEN","OAK","DAL","IND","SEA","CIN","PIT","JAC" -                ,"BAL","SD","DEN","MIN","ATL","KC","NYG","GB","DET","HOU","STL","CHI","CAR", -                "MIA","BUF","SF","WAS","NYJ","TB"] -  if(request.text && botRegex.test(request.text)) { -    this.res.writeHead(200); -    postMessage(cool()); -    this.res.end(); -  } -  else if(request.text && botRegexDL.test(request.text)) { -    this.res.writeHead(200); -    postMessage("http://daddyleagues.com/NLB/team/"+request.text.substring(5,8)+"/depthchart"); -    this.res.end(); -  } -  else if(request.text && botRegexHarper.test(request.text)) { -    this.res.writeHead(200); -    postMessage("http://36.media.tumblr.com/06086ac9d889c7729d928d4aa5d1405b/tumblr_nk8g0fFErk1s2yr14o1_1280.jpg"); -    this.res.end(); -  } -    else if(request.text && botRegexReid.test(request.text)) { -    this.res.writeHead(200); -    postMessage("https://media4.giphy.com/media/g9RplpKZNkT5u/giphy.gif"); -    this.res.end(); -  } -  else if(request.text && botRegexBurn.test(request.text)) { -    this.res.writeHead(200); -    postMessage("http://45.media.tumblr.com/tumblr_ly1efoFthg1r4ghkoo1_500.gif"); -    this.res.end(); -  } -  else if(request.text && botRegexTom.test(request.text)) { -    this.res.writeHead(200); -    postMessage("https://media.giphy.com/media/Nccs0rNvVC1nG/giphy.gif"); -    this.res.end(); -  } -  else if(request.text && botRegexjj.test(request.text)) { -    this.res.writeHead(200); -    postMessage("https://media.giphy.com/media/ZQnr4SydezPLG/giphy.gif"); -    this.res.end(); -  } -  else if(request.text && botRegexAd.test(request.text)) { -    this.res.writeHead(200); -    postMessage("http://www.hackcollege.com/wp-content/uploads/2013/02/kno_advance.jpg"); -    this.res.end(); -  } -  else if(request.text && botRegexRules.test(request.text)) { -    this.res.writeHead(200); -    postMessage("http://daddyleagues.com/NLB/rules"); -    this.res.end(); -  } -  else if(request.text && botRegexGTA.test(request.text)) { -    this.res.writeHead(200); -    postMessage("https://i.groupme.com/220x147.jpeg.a2dd2add32b14fff9e329535186d793c.large"); -    this.res.end(); -  } -  else if(request.text && botRegexSC.test(request.text)) { -    this.res.writeHead(200); -    postMessage("http://daddyleagues.com/NLB/team/"+request.text.substring(5,8)+"/schedule"); -    this.res.end(); -  } -  else if(request.text && botRegexP.test(request.text)) { -    this.res.writeHead(200); -    var req = request.text.substring(5,request.text.length); -    var rep = req.replace(/ /,"+"); -    postMessage("http://daddyleagues.com/NLB/players?name="+rep+"&position=all&team=all"); -    this.res.end(); -  }   + var request = JSON.parse(this.req.chunks[0]), + botRegex = /^\/cool guy/; botRegexDL = /^\/DDL/i;botRegexSalt = /^\/salt/;botRegexRules = /^\/rules/ + botRegexAd=/^\/advance/;botRegexGTA = /^\/gta/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/; + botRegexP = /^\/PDL/i; botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; + botRegexSiege = /^\/siege/; botRegexOW = /^\/ratings/; + botRegexSlut = /^\/slut/; botRegexStop = /^\/stop/; + botRegexProp = /^\/prop/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexBrye = /^\/brye/; + botRegexGian = /^\/gian/; botRegexScrotes = /^\/scrotes/; botRegexShaki = /^\/shaki/; + botRegexDaf = /^\/dafuq/; botRegexAyy = /^\/ayy/; + siege1 = 'https://i.groupme.com/350x419.png.adc8c73a6c1547e0a9e04320296329f8'; siege2 = 'https://i.groupme.com/1279x752.jpeg.aa5d0401e0df495bba4b4e09dc5a6bd7' + siege3 = 'https://i.groupme.com/960x960.png.006e180e05d841c6a2962e844bf1e6fd'; + var teamAb = ["NE","NO","ARI","PHI","CLE","TEN","OAK","DAL","IND","SEA","CIN","PIT","JAC" + ,"BAL","SD","DEN","MIN","ATL","KC","NYG","GB","DET","HOU","STL","CHI","CAR", + "MIA","BUF","SF","WAS","NYJ","TB"] + if(request.text && botRegex.test(request.text)) { + this.res.writeHead(200); + postMessage(cool()); + this.res.end(); + } + else if(request.text && botRegexSlut.test(request.text)) { + this.res.writeHead(200); + postMessage("https://i.groupme.com/640x364.jpeg.f8a0e216bf7e42ed9a86b3ae23cc2ff1.large"); + this.res.end(); + } + else if(request.text && botRegexStop.test(request.text)) { + this.res.writeHead(200); + postMessage("Stop appropriating black culture"); + this.res.end(); + } + else if(request.text && botRegexProp.test(request.text)) { + this.res.writeHead(200); + postMessage("https://i.groupme.com/409x327.jpeg.08b5d95c51bb4897835cfe6b514f2f52.large"); + this.res.end(); + } + else if(request.text && botRegexKys.test(request.text)) { + this.res.writeHead(200); + postMessage("http://www.wikihow.com/Tie-a-Noose"); + this.res.end(); + } + else if(request.text && botRegexSlam.test(request.text)) { + this.res.writeHead(200); + postMessage("https://pbs.twimg.com/profile_images/587294731471757313/ZpI5PfKq.jpg"); + this.res.end(); + } + else if(request.text && botRegexDaf.test(request.text)) { + this.res.writeHead(200); + postMessage("http://i3.kym-cdn.com/photos/images/facebook/000/787/356/d6f.jpg"); + this.res.end(); + } + else if(request.text && botRegexBrye.test(request.text)) { + this.res.writeHead(200); + postMessage("https://i.groupme.com/600x490.jpeg.b31d5153fb474d9bb18dd51b3d650afe.large"); + this.res.end(); + } + else if(request.text && botRegexGian.test(request.text)) { + this.res.writeHead(200); + postMessage("http://i.imgur.com/9V6ZnvD.png"); + this.res.end(); + } + else if(request.text && botRegexScrotes.test(request.text)) { + this.res.writeHead(200); + postMessage("https://i.groupme.com/1006x1340.jpeg.730381e4280e4028b8375432af14f39f.large"); + this.res.end(); + } + else if(request.text && botRegexShaki.test(request.text)) { + this.res.writeHead(200); + postMessage("https://i.groupme.com/305x375.jpeg.a8dd3aa18c7a4963a553e6dc16bcb100.large"); + this.res.end(); + } + else if(request.text && botRegexDL.test(request.text)) { + this.res.writeHead(200); + postMessage("http://www.daddyleagues.com/maddenrating?name=&position=all&team="+request.text.substring(5,8)); + //postMessage("http://daddyleagues.com/NLB/team/"+request.text.substring(5,8)+"/depthchart"); + this.res.end(); + } + + else if(request.text && botRegexOW.test(request.text)) { + this.res.writeHead(200); + postMessage("www.daddyleagues.com/maddenrating/"); + this.res.end(); + } + else if(request.text && botRegexSalt.test(request.text)) { + this.res.writeHead(200); + postMessage("https://i.imgur.com/B5BSVqH.png"); + this.res.end(); + } + else if(request.text && botRegexAd.test(request.text)) { + this.res.writeHead(200); + postMessage("http://www.hackcollege.com/wp-content/uploads/2013/02/kno_advance.jpg"); + this.res.end(); + } + else if(request.text && botRegexRules.test(request.text)) { + this.res.writeHead(200); + postMessage("https://www.daddyleagues.com/NLB/rules"); + this.res.end(); + } + else if(request.text && botRegexGTA.test(request.text)) { + this.res.writeHead(200); + postMessage("https://i.groupme.com/220x147.jpeg.a2dd2add32b14fff9e329535186d793c.large"); + this.res.end(); + } + else if(request.text && botRegexSC.test(request.text)) { + this.res.writeHead(200); + + postMessage("http://daddyleagues.com/NLB/team/"+request.text.substring(5,8)+"/schedule"); + this.res.end(); + } + else if(request.text && botRegexP.test(request.text)) { + this.res.writeHead(200); + var req = request.text.substring(5,request.text.length); + var rep = req.replace(/ /,"+"); + postMessage("http://www.daddyleagues.com/maddenrating?name="+rep+"&position=all&team=all"); + + this.res.end(); + } -  else if(request.text && botRegexTw.test(request.text)) { -    this.res.writeHead(200); -    postMessage("http://www.twitch.tv/"+request.text.substring(8,request.text.length)); -    this.res.end(); -  } -  else if(request.text && botRegexSb.test(request.text)) { -    this.res.writeHead(200); -    postMessage("http://www.reddit.com/r/maddenall32"); -    this.res.end(); -  } -  else if(request.text && botRegexSh.test(request.text)) { -    this.res.writeHead(200); -    postMessage("¯\\_(ツ)_/¯"); -    this.res.end(); -  } -  else if(request.text && botRegexWk.test(request.text)) { -    this.res.writeHead(200); -    postMessage("https://docs.google.com/spreadsheets/d/1kJqQWCq3RKiTrd4f71FFNKr-Y0ppJzjk0fSF0rP6Bto/edit?usp=sharing"); -    this.res.end(); -  } -  else if(request.text && botODB.test(request.text)) { -    this.res.writeHead(200); -    postMessage("OBJ*"); -    this.res.end(); -  } -  else if(request.text && botDuck.test(request.text)) { -    this.res.writeHead(200); -    postMessage("http://media3.giphy.com/media/YCseTHF2I6CCA/giphy.gif"); -    this.res.end(); -  } -  else if(request.text && botRegexCC.test(request.text)) { -    this.res.writeHead(200); -    postMessage("https://i.groupme.com/851x1184.jpeg.330228901f684b0cb46cd1cef6953923"); -    this.res.end(); -  } -  else if(request.text && botRegexSiege.test(request.text)) { -    this.res.writeHead(200); -    if(0.6 >= Math.random() > 0.3) -      postMessage(siege1); -    else if(Math.random() >0.6) -      postMessage(siege3) -    else -      postMessage(siege2); -    this.res.end(); -  } -   -  else { -    console.log("don't care"); -    this.res.writeHead(200); -    this.res.end(); -  } + else if(request.text && botRegexTw.test(request.text)) { + this.res.writeHead(200); + postMessage("http://www.twitch.tv/"+request.text.substring(8,request.text.length)); + this.res.end(); + } + else if(request.text && botRegexSb.test(request.text)) { + this.res.writeHead(200); + postMessage("http://www.reddit.com/r/maddenall32"); + this.res.end(); + } + else if(request.text && botRegexSh.test(request.text)) { + this.res.writeHead(200); + postMessage("¯\\_(ツ)_/¯"); + this.res.end(); + } + else if(request.text && botRegexWk.test(request.text)) { + this.res.writeHead(200); + postMessage("https://docs.google.com/spreadsheets/d/1kJqQWCq3RKiTrd4f71FFNKr-Y0ppJzjk0fSF0rP6Bto/edit?usp=sharing"); + this.res.end(); + } + else if(request.text && botODB.test(request.text)) { + this.res.writeHead(200); + postMessage("OBJ*"); + this.res.end(); + } + else if(request.text && botDuck.test(request.text)) { + this.res.writeHead(200); + postMessage("http://media3.giphy.com/media/YCseTHF2I6CCA/giphy.gif"); + this.res.end(); + } + else if(request.text && botRegexCC.test(request.text)) { + this.res.writeHead(200); + postMessage("https://i.groupme.com/851x1184.jpeg.330228901f684b0cb46cd1cef6953923"); + this.res.end(); + } + else if(request.text && botRegexCC.test(request.text)) { + this.res.writeHead(200); + postMessage("(☞゚ヮ゚)☞"); + this.res.end(); + } + + else if(request.text && botRegexSiege.test(request.text)) { + this.res.writeHead(200); + if(0.6 >= Math.random() > 0.3) + postMessage(siege1); + else if(Math.random() >0.6) + postMessage(siege3) + else + postMessage(siege2); + this.res.end(); + } + + else { + console.log("don't care"); + this.res.writeHead(200); + this.res.end(); + } } function postMessage(response) { -  var botResponse,options, body, botReq; + var botResponse,options, body, botReq; -  botResponse = response + botResponse = response -  options = { -    hostname: 'api.groupme.com', -    path: '/v3/bots/post', -    method: 'POST' -  }; + options = { + hostname: 'api.groupme.com', + path: '/v3/bots/post', + method: 'POST' + }; -  body = { -    "bot_id" : botID, -    "text" : botResponse -  }; + body = { + "bot_id" : botID, + "text" : botResponse + }; -  console.log('sending ' + botResponse + ' to ' + botID); + console.log('sending ' + botResponse + ' to ' + botID); -  botReq = HTTPS.request(options, function(res) { -      if(res.statusCode == 202) { -        //neat -      } else { -        console.log('rejecting bad status code ' + res.statusCode); -      } -  }); + botReq = HTTPS.request(options, function(res) { + if(res.statusCode == 202) { + //neat + } else { + console.log('rejecting bad status code ' + res.statusCode); + } + }); -  botReq.on('error', function(err) { -    console.log('error posting message '  + JSON.stringify(err)); -  }); -  botReq.on('timeout', function(err) { -    console.log('timeout posting message '  + JSON.stringify(err)); -  }); -  botReq.end(JSON.stringify(body)); + botReq.on('error', function(err) { + console.log('error posting message ' + JSON.stringify(err)); + }); + botReq.on('timeout', function(err) { + console.log('timeout posting message ' + JSON.stringify(err)); + }); + botReq.end(JSON.stringify(body)); } function getRandomInt(min, max) { -  return Math.floor(Math.random() * (max - min)) + min; + return Math.floor(Math.random() * (max - min)) + min; } From 9ab7bcc68eb01ef88f19a21a549d5b9e4c1dea49 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sat, 15 Oct 2016 01:22:43 -0500 Subject: [PATCH 13/29] Update bot.js --- bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index f3744e512..451742740 100644 --- a/bot.js +++ b/bot.js @@ -6,7 +6,7 @@ var botID = process.env.BOT_ID; function respond() { var request = JSON.parse(this.req.chunks[0]), botRegex = /^\/cool guy/; botRegexDL = /^\/DDL/i;botRegexSalt = /^\/salt/;botRegexRules = /^\/rules/ - botRegexAd=/^\/advance/;botRegexGTA = /^\/gta/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/; + botRegexAd=/^\/advance/;botRegexTrades = /^\/trades/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/; botRegexP = /^\/PDL/i; botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; botRegexSiege = /^\/siege/; botRegexOW = /^\/ratings/; botRegexSlut = /^\/slut/; botRegexStop = /^\/stop/; @@ -100,9 +100,9 @@ function respond() { postMessage("https://www.daddyleagues.com/NLB/rules"); this.res.end(); } - else if(request.text && botRegexGTA.test(request.text)) { + else if(request.text && botRegexTrades.test(request.text)) { this.res.writeHead(200); - postMessage("https://i.groupme.com/220x147.jpeg.a2dd2add32b14fff9e329535186d793c.large"); + postMessage("https://www.daddyleagues.com/NLB/forum/forum/6003"); this.res.end(); } else if(request.text && botRegexSC.test(request.text)) { From 0024c09873442fb22345eed3c198b7612342d16d Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sat, 15 Oct 2016 01:27:09 -0500 Subject: [PATCH 14/29] Update bot.js --- bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index 451742740..5c0678773 100644 --- a/bot.js +++ b/bot.js @@ -10,7 +10,7 @@ function respond() { botRegexP = /^\/PDL/i; botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; botRegexSiege = /^\/siege/; botRegexOW = /^\/ratings/; botRegexSlut = /^\/slut/; botRegexStop = /^\/stop/; - botRegexProp = /^\/prop/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexBrye = /^\/brye/; + botRegexProp = /^\/prop/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexLyd = /^\/lyd/; botRegexGian = /^\/gian/; botRegexScrotes = /^\/scrotes/; botRegexShaki = /^\/shaki/; botRegexDaf = /^\/dafuq/; botRegexAyy = /^\/ayy/; siege1 = 'https://i.groupme.com/350x419.png.adc8c73a6c1547e0a9e04320296329f8'; siege2 = 'https://i.groupme.com/1279x752.jpeg.aa5d0401e0df495bba4b4e09dc5a6bd7' @@ -53,9 +53,9 @@ function respond() { postMessage("http://i3.kym-cdn.com/photos/images/facebook/000/787/356/d6f.jpg"); this.res.end(); } - else if(request.text && botRegexBrye.test(request.text)) { + else if(request.text && botRegexLyd.test(request.text)) { this.res.writeHead(200); - postMessage("https://i.groupme.com/600x490.jpeg.b31d5153fb474d9bb18dd51b3d650afe.large"); + postMessage("https://media.giphy.com/media/qVyrWRVaFoP7O/giphy.gif"); this.res.end(); } else if(request.text && botRegexGian.test(request.text)) { From 09756caff804a207873af71f663ce7de2669506b Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sat, 15 Oct 2016 01:29:14 -0500 Subject: [PATCH 15/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 5c0678773..556a3b995 100644 --- a/bot.js +++ b/bot.js @@ -55,7 +55,7 @@ function respond() { } else if(request.text && botRegexLyd.test(request.text)) { this.res.writeHead(200); - postMessage("https://media.giphy.com/media/qVyrWRVaFoP7O/giphy.gif"); + postMessage("https://media2.giphy.com/media/pUeXcg80cO8I8/200.gif#4"); this.res.end(); } else if(request.text && botRegexGian.test(request.text)) { From 3df6c2f8c73568621592fabe2317fbd672e2f9cc Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sun, 16 Oct 2016 09:16:37 -0500 Subject: [PATCH 16/29] Update bot.js --- bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index 556a3b995..3162ae149 100644 --- a/bot.js +++ b/bot.js @@ -9,7 +9,7 @@ function respond() { botRegexAd=/^\/advance/;botRegexTrades = /^\/trades/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/; botRegexP = /^\/PDL/i; botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; botRegexSiege = /^\/siege/; botRegexOW = /^\/ratings/; - botRegexSlut = /^\/slut/; botRegexStop = /^\/stop/; + botRegexBurn = /^\/burn/; botRegexStop = /^\/stop/; botRegexProp = /^\/prop/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexLyd = /^\/lyd/; botRegexGian = /^\/gian/; botRegexScrotes = /^\/scrotes/; botRegexShaki = /^\/shaki/; botRegexDaf = /^\/dafuq/; botRegexAyy = /^\/ayy/; @@ -23,9 +23,9 @@ function respond() { postMessage(cool()); this.res.end(); } - else if(request.text && botRegexSlut.test(request.text)) { + else if(request.text && botRegexBurn.test(request.text)) { this.res.writeHead(200); - postMessage("https://i.groupme.com/640x364.jpeg.f8a0e216bf7e42ed9a86b3ae23cc2ff1.large"); + postMessage("https://media.giphy.com/media/pQmWjYrz39YAg/giphy.gif"); this.res.end(); } else if(request.text && botRegexStop.test(request.text)) { From 02bf37df09ac26f2f89e83d4e976a4d6951dcf24 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sun, 16 Oct 2016 09:23:27 -0500 Subject: [PATCH 17/29] Update bot.js --- bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index 3162ae149..50469d6d2 100644 --- a/bot.js +++ b/bot.js @@ -9,7 +9,7 @@ function respond() { botRegexAd=/^\/advance/;botRegexTrades = /^\/trades/; botRegexSC = /^\/SDL/i; botODB = /(.*\s+)(.*odb)(\s+.*)/i; botDuck = /^\/duck/; botRegexP = /^\/PDL/i; botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; botRegexSiege = /^\/siege/; botRegexOW = /^\/ratings/; - botRegexBurn = /^\/burn/; botRegexStop = /^\/stop/; + botRegexBurn = /^\/burn/; botRegexDrink = /^\/drink/; botRegexProp = /^\/prop/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexLyd = /^\/lyd/; botRegexGian = /^\/gian/; botRegexScrotes = /^\/scrotes/; botRegexShaki = /^\/shaki/; botRegexDaf = /^\/dafuq/; botRegexAyy = /^\/ayy/; @@ -28,9 +28,9 @@ function respond() { postMessage("https://media.giphy.com/media/pQmWjYrz39YAg/giphy.gif"); this.res.end(); } - else if(request.text && botRegexStop.test(request.text)) { + else if(request.text && botRegexDrink.test(request.text)) { this.res.writeHead(200); - postMessage("Stop appropriating black culture"); + postMessage("https://media.giphy.com/media/3o7TKBcK5ywsaeBm4U/giphy.gif"); this.res.end(); } else if(request.text && botRegexProp.test(request.text)) { From 97bf9e467864dd66d6be6685192f171f13efe330 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sun, 16 Oct 2016 09:31:25 -0500 Subject: [PATCH 18/29] Update bot.js --- bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index 50469d6d2..38c14ef8a 100644 --- a/bot.js +++ b/bot.js @@ -10,7 +10,7 @@ function respond() { botRegexP = /^\/PDL/i; botRegexTw = /^\/twitch/i; botRegexSb = /^\/sub/; botRegexSh = /^\/shrug/; botRegexWk = /^\/users/; botRegexCC = /^\/cc/; botRegexSiege = /^\/siege/; botRegexOW = /^\/ratings/; botRegexBurn = /^\/burn/; botRegexDrink = /^\/drink/; - botRegexProp = /^\/prop/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexLyd = /^\/lyd/; + botRegexReid = /^\/reid/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexLyd = /^\/lyd/; botRegexGian = /^\/gian/; botRegexScrotes = /^\/scrotes/; botRegexShaki = /^\/shaki/; botRegexDaf = /^\/dafuq/; botRegexAyy = /^\/ayy/; siege1 = 'https://i.groupme.com/350x419.png.adc8c73a6c1547e0a9e04320296329f8'; siege2 = 'https://i.groupme.com/1279x752.jpeg.aa5d0401e0df495bba4b4e09dc5a6bd7' @@ -33,9 +33,9 @@ function respond() { postMessage("https://media.giphy.com/media/3o7TKBcK5ywsaeBm4U/giphy.gif"); this.res.end(); } - else if(request.text && botRegexProp.test(request.text)) { + else if(request.text && botRegexReid.test(request.text)) { this.res.writeHead(200); - postMessage("https://i.groupme.com/409x327.jpeg.08b5d95c51bb4897835cfe6b514f2f52.large"); + postMessage("https://media.giphy.com/media/g9RplpKZNkT5u/giphy.gif"); this.res.end(); } else if(request.text && botRegexKys.test(request.text)) { From b21f1a0b5c099b6b4a9359941603154f8ee06b3c Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Tue, 3 Jan 2017 19:28:57 -0600 Subject: [PATCH 19/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 38c14ef8a..4daca5c3e 100644 --- a/bot.js +++ b/bot.js @@ -102,7 +102,7 @@ function respond() { } else if(request.text && botRegexTrades.test(request.text)) { this.res.writeHead(200); - postMessage("https://www.daddyleagues.com/NLB/forum/forum/6003"); + postMessage("https://www.daddyleagues.com/NLB/forum"); this.res.end(); } else if(request.text && botRegexSC.test(request.text)) { From 92e4c59715d715b2d8cb88bbbe951f94d1550b2a Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Tue, 3 Jan 2017 19:44:02 -0600 Subject: [PATCH 20/29] Update bot.js --- bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index 4daca5c3e..f713a7330 100644 --- a/bot.js +++ b/bot.js @@ -75,14 +75,14 @@ function respond() { } else if(request.text && botRegexDL.test(request.text)) { this.res.writeHead(200); - postMessage("http://www.daddyleagues.com/maddenrating?name=&position=all&team="+request.text.substring(5,8)); + postMessage("http://daddyleagues.com/NLB/players?name=&position=all&team="+request.text.substring(5,8)); //postMessage("http://daddyleagues.com/NLB/team/"+request.text.substring(5,8)+"/depthchart"); this.res.end(); } else if(request.text && botRegexOW.test(request.text)) { this.res.writeHead(200); - postMessage("www.daddyleagues.com/maddenrating/"); + postMessage("www.daddyleagues.com/NLB/maddenrating/"); this.res.end(); } else if(request.text && botRegexSalt.test(request.text)) { @@ -115,7 +115,7 @@ function respond() { this.res.writeHead(200); var req = request.text.substring(5,request.text.length); var rep = req.replace(/ /,"+"); - postMessage("http://www.daddyleagues.com/maddenrating?name="+rep+"&position=all&team=all"); + postMessage("http://daddyleagues.com/NLB/players?name="+rep+"&position=all&team=all"); this.res.end(); } From c43435968f1469791b04a91d0f8d42b5855b4563 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sat, 7 Jan 2017 14:05:31 -0600 Subject: [PATCH 21/29] Update bot.js --- bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index f713a7330..a91636f95 100644 --- a/bot.js +++ b/bot.js @@ -11,7 +11,7 @@ function respond() { botRegexSiege = /^\/siege/; botRegexOW = /^\/ratings/; botRegexBurn = /^\/burn/; botRegexDrink = /^\/drink/; botRegexReid = /^\/reid/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexLyd = /^\/lyd/; - botRegexGian = /^\/gian/; botRegexScrotes = /^\/scrotes/; botRegexShaki = /^\/shaki/; + botRegexGian = /^\/gian/; botRegexGooden = /^\/gooden/; botRegexShaki = /^\/shaki/; botRegexDaf = /^\/dafuq/; botRegexAyy = /^\/ayy/; siege1 = 'https://i.groupme.com/350x419.png.adc8c73a6c1547e0a9e04320296329f8'; siege2 = 'https://i.groupme.com/1279x752.jpeg.aa5d0401e0df495bba4b4e09dc5a6bd7' siege3 = 'https://i.groupme.com/960x960.png.006e180e05d841c6a2962e844bf1e6fd'; @@ -63,9 +63,9 @@ function respond() { postMessage("http://i.imgur.com/9V6ZnvD.png"); this.res.end(); } - else if(request.text && botRegexScrotes.test(request.text)) { + else if(request.text && botRegexGooden.test(request.text)) { this.res.writeHead(200); - postMessage("https://i.groupme.com/1006x1340.jpeg.730381e4280e4028b8375432af14f39f.large"); + postMessage("https://pbs.twimg.com/media/C1ltrzkWEAEs45m?format=jpg&name=large"); this.res.end(); } else if(request.text && botRegexShaki.test(request.text)) { From 2217b7d9e460c3603e9a68c50e8db967ab26e352 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sat, 7 Jan 2017 14:09:33 -0600 Subject: [PATCH 22/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index a91636f95..7bcd3e85a 100644 --- a/bot.js +++ b/bot.js @@ -65,7 +65,7 @@ function respond() { } else if(request.text && botRegexGooden.test(request.text)) { this.res.writeHead(200); - postMessage("https://pbs.twimg.com/media/C1ltrzkWEAEs45m?format=jpg&name=large"); + postMessage("https://lh3.googleusercontent.com/GEjt3sEqUlRASNydTc2eq1bVbiCeN0ui7WcrikYjg9WRN_i2LlWMQCX1rw-_0qAXbeB_Dw=s155"); this.res.end(); } else if(request.text && botRegexShaki.test(request.text)) { From aaf5e49f6ed1b301c9d884adbacb6cdfe0937de5 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sat, 7 Jan 2017 14:12:14 -0600 Subject: [PATCH 23/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 7bcd3e85a..01222a215 100644 --- a/bot.js +++ b/bot.js @@ -65,7 +65,7 @@ function respond() { } else if(request.text && botRegexGooden.test(request.text)) { this.res.writeHead(200); - postMessage("https://lh3.googleusercontent.com/GEjt3sEqUlRASNydTc2eq1bVbiCeN0ui7WcrikYjg9WRN_i2LlWMQCX1rw-_0qAXbeB_Dw=s155"); + postMessage("pbs.twimg.com/media/C1ltrzkWEAEs45m?format=jpg&name=large"); this.res.end(); } else if(request.text && botRegexShaki.test(request.text)) { From d192e76a019a8ac16a50b93779c7f1e5df7c7f00 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sat, 7 Jan 2017 14:17:44 -0600 Subject: [PATCH 24/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 01222a215..8c1bfc12d 100644 --- a/bot.js +++ b/bot.js @@ -65,7 +65,7 @@ function respond() { } else if(request.text && botRegexGooden.test(request.text)) { this.res.writeHead(200); - postMessage("pbs.twimg.com/media/C1ltrzkWEAEs45m?format=jpg&name=large"); + postMessage("http://s1298.photobucket.com/user/Mike888/media/IMG-1658484014_zpsgg1ieq6e.jpg.html"); this.res.end(); } else if(request.text && botRegexShaki.test(request.text)) { From b799d38ab06af776679b213af25cd7ccb690997d Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sat, 7 Jan 2017 14:33:30 -0600 Subject: [PATCH 25/29] Update bot.js --- bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index 8c1bfc12d..2b0a6cc76 100644 --- a/bot.js +++ b/bot.js @@ -11,7 +11,7 @@ function respond() { botRegexSiege = /^\/siege/; botRegexOW = /^\/ratings/; botRegexBurn = /^\/burn/; botRegexDrink = /^\/drink/; botRegexReid = /^\/reid/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexLyd = /^\/lyd/; - botRegexGian = /^\/gian/; botRegexGooden = /^\/gooden/; botRegexShaki = /^\/shaki/; + botRegexHarper = /^\/harper/; botRegexGooden = /^\/gooden/; botRegexShaki = /^\/shaki/; botRegexDaf = /^\/dafuq/; botRegexAyy = /^\/ayy/; siege1 = 'https://i.groupme.com/350x419.png.adc8c73a6c1547e0a9e04320296329f8'; siege2 = 'https://i.groupme.com/1279x752.jpeg.aa5d0401e0df495bba4b4e09dc5a6bd7' siege3 = 'https://i.groupme.com/960x960.png.006e180e05d841c6a2962e844bf1e6fd'; @@ -58,9 +58,9 @@ function respond() { postMessage("https://media2.giphy.com/media/pUeXcg80cO8I8/200.gif#4"); this.res.end(); } - else if(request.text && botRegexGian.test(request.text)) { + else if(request.text && botRegexHarper.test(request.text)) { this.res.writeHead(200); - postMessage("http://i.imgur.com/9V6ZnvD.png"); + postMessage("https://i.imgur.com/qTkLD6V.jpg"); this.res.end(); } else if(request.text && botRegexGooden.test(request.text)) { From 0178662c5b3b2c81eca0fc2417829aa6c8e24333 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sat, 7 Jan 2017 15:19:42 -0600 Subject: [PATCH 26/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 2b0a6cc76..fce2cf1e4 100644 --- a/bot.js +++ b/bot.js @@ -65,7 +65,7 @@ function respond() { } else if(request.text && botRegexGooden.test(request.text)) { this.res.writeHead(200); - postMessage("http://s1298.photobucket.com/user/Mike888/media/IMG-1658484014_zpsgg1ieq6e.jpg.html"); + postMessage("https://scontent.ford1-1.fna.fbcdn.net/v/t1.0-9/15826744_10209145069717099_8029939462810176348_n.jpg?oh=7a85b5c900234acca9a516e4de1f5e36&oe=592150A9"); this.res.end(); } else if(request.text && botRegexShaki.test(request.text)) { From 27a0a2f72ea1c98f2c87749e1405a3e1eb9d8f1e Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sun, 22 Jan 2017 13:47:23 -0600 Subject: [PATCH 27/29] Update bot.js --- bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index fce2cf1e4..33797ce60 100644 --- a/bot.js +++ b/bot.js @@ -11,7 +11,7 @@ function respond() { botRegexSiege = /^\/siege/; botRegexOW = /^\/ratings/; botRegexBurn = /^\/burn/; botRegexDrink = /^\/drink/; botRegexReid = /^\/reid/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexLyd = /^\/lyd/; - botRegexHarper = /^\/harper/; botRegexGooden = /^\/gooden/; botRegexShaki = /^\/shaki/; + botRegexHarper = /^\/harper/; botRegexGooden = /^\/gooden/; botRegexCheesy = /^\/cheesy/; botRegexDaf = /^\/dafuq/; botRegexAyy = /^\/ayy/; siege1 = 'https://i.groupme.com/350x419.png.adc8c73a6c1547e0a9e04320296329f8'; siege2 = 'https://i.groupme.com/1279x752.jpeg.aa5d0401e0df495bba4b4e09dc5a6bd7' siege3 = 'https://i.groupme.com/960x960.png.006e180e05d841c6a2962e844bf1e6fd'; @@ -68,9 +68,9 @@ function respond() { postMessage("https://scontent.ford1-1.fna.fbcdn.net/v/t1.0-9/15826744_10209145069717099_8029939462810176348_n.jpg?oh=7a85b5c900234acca9a516e4de1f5e36&oe=592150A9"); this.res.end(); } - else if(request.text && botRegexShaki.test(request.text)) { + else if(request.text && botRegexCheesy.test(request.text)) { this.res.writeHead(200); - postMessage("https://i.groupme.com/305x375.jpeg.a8dd3aa18c7a4963a553e6dc16bcb100.large"); + postMessage("http://giphy.com/gifs/television-90s-oGBw7OaVBei1W"); this.res.end(); } else if(request.text && botRegexDL.test(request.text)) { From 45e7325a3cab30d7c2cadccc72043e515b7eddb0 Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Sun, 22 Jan 2017 13:49:31 -0600 Subject: [PATCH 28/29] Update bot.js --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 33797ce60..3f534eaa5 100644 --- a/bot.js +++ b/bot.js @@ -70,7 +70,7 @@ function respond() { } else if(request.text && botRegexCheesy.test(request.text)) { this.res.writeHead(200); - postMessage("http://giphy.com/gifs/television-90s-oGBw7OaVBei1W"); + postMessage("https://media.giphy.com/media/oGBw7OaVBei1W/giphy.gif"); this.res.end(); } else if(request.text && botRegexDL.test(request.text)) { From 0899fb0512e208504853ea9560afef8a777d0fbf Mon Sep 17 00:00:00 2001 From: Alexdisch Date: Thu, 9 Mar 2017 18:45:41 -0600 Subject: [PATCH 29/29] Update bot.js --- bot.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bot.js b/bot.js index 3f534eaa5..7c8acb2bc 100644 --- a/bot.js +++ b/bot.js @@ -75,14 +75,14 @@ function respond() { } else if(request.text && botRegexDL.test(request.text)) { this.res.writeHead(200); - postMessage("http://daddyleagues.com/NLB/players?name=&position=all&team="+request.text.substring(5,8)); - //postMessage("http://daddyleagues.com/NLB/team/"+request.text.substring(5,8)+"/depthchart"); + postMessage("http://daddyleagues.com/CandC/players?name=&position=all&team="+request.text.substring(5,8)); + //postMessage("http://daddyleagues.com/CandC/team/"+request.text.substring(5,8)+"/depthchart"); this.res.end(); } else if(request.text && botRegexOW.test(request.text)) { this.res.writeHead(200); - postMessage("www.daddyleagues.com/NLB/maddenrating/"); + postMessage("www.daddyleagues.com/CandC/maddenrating/"); this.res.end(); } else if(request.text && botRegexSalt.test(request.text)) { @@ -97,25 +97,25 @@ function respond() { } else if(request.text && botRegexRules.test(request.text)) { this.res.writeHead(200); - postMessage("https://www.daddyleagues.com/NLB/rules"); + postMessage("https://www.daddyleagues.com/CandC/rules"); this.res.end(); } else if(request.text && botRegexTrades.test(request.text)) { this.res.writeHead(200); - postMessage("https://www.daddyleagues.com/NLB/forum"); + postMessage("https://www.daddyleagues.com/CandC/forum"); this.res.end(); } else if(request.text && botRegexSC.test(request.text)) { this.res.writeHead(200); - postMessage("http://daddyleagues.com/NLB/team/"+request.text.substring(5,8)+"/schedule"); + postMessage("http://daddyleagues.com/CandC/team/"+request.text.substring(5,8)+"/schedule"); this.res.end(); } else if(request.text && botRegexP.test(request.text)) { this.res.writeHead(200); var req = request.text.substring(5,request.text.length); var rep = req.replace(/ /,"+"); - postMessage("http://daddyleagues.com/NLB/players?name="+rep+"&position=all&team=all"); + postMessage("http://daddyleagues.com/CandC/players?name="+rep+"&position=all&team=all"); this.res.end(); }