Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ function respond() {
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/;
botRegexCheese = /^\/cheese/; botRegexOW = /^\/ratings/;
botRegexSiege = /^\/siege/; botRegexFoh = /^\/foh/;
botRegexProp = /^\/prop/;botRegexKys = /^\/kys/; botRegexSlam = /^\/slam/; botRegexBrye = /^\/brye/;
botRegexGian = /^\/gian/; botRegexScrotes = /^\/scrotes/; botRegexShaki = /^\/shaki/;
botRegexDaf = /^\/dafuq/; botRegexAyy = /^\/ayy/; botRegexSchedule = /^\/schedule/;
Expand All @@ -23,14 +23,14 @@ function respond() {
postMessage(cool());
this.res.end();
}
else if(request.text && botRegexSlut.test(request.text)) {
else if(request.text && botRegexCheese.test(request.text)) {
this.res.writeHead(200);
postMessage("https://i.groupme.com/640x364.jpeg.f8a0e216bf7e42ed9a86b3ae23cc2ff1.large");
postMessage("https://media1.giphy.com/media/26FKSXORxdIT3aut2/200w_d.gif");
this.res.end();
}
else if(request.text && botRegexStop.test(request.text)) {
else if(request.text && botRegexFoh.test(request.text)) {
this.res.writeHead(200);
postMessage("Stop appropriating black culture");
postMessage("https://media0.giphy.com/media/3o6Zt9oH4syvJuyh3i/200_d.gif");
this.res.end();
}
else if(request.text && botRegexProp.test(request.text)) {
Expand Down Expand Up @@ -76,7 +76,7 @@ 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/maddenall32/team/"+request.text.substring(5,8)+"/depthchart");
postMessage("http://daddyleagues.com/ams/team/"+request.text.substring(5,8)+"/depthchart");
this.res.end();
}

Expand All @@ -97,7 +97,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("https://www.daddyleagues.com/ams/rules");
this.res.end();
}
else if(request.text && botRegexGTA.test(request.text)) {
Expand All @@ -108,14 +108,14 @@ function respond() {
else if(request.text && botRegexSC.test(request.text)) {
this.res.writeHead(200);

postMessage("http://daddyleagues.com/maddenall32/team/"+request.text.substring(5,8)+"/schedule");
postMessage("http://daddyleagues.com/ams/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/maddenall32/players?name="+rep+"&position=all&team=all");
postMessage("http://daddyleagues.com/ams/players?name="+rep+"&position=all&team=all");

this.res.end();
}
Expand All @@ -137,7 +137,7 @@ function respond() {
}
else if(request.text && botRegexWk.test(request.text)) {
this.res.writeHead(200);
postMessage("https://docs.google.com/spreadsheets/d/1kJqQWCq3RKiTrd4f71FFNKr-Y0ppJzjk0fSF0rP6Bto/edit?usp=sharing");
postMessage("https://www.daddyleagues.com/ams/schedules");
this.res.end();
}
else if(request.text && botODB.test(request.text)) {
Expand All @@ -162,7 +162,7 @@ function respond() {
}
else if(request.text && botRegexSchedule.test(request.text)) {
this.res.writeHead(200);
postMessage("https://docs.google.com/spreadsheets/d/1EORExkB6HNLZhi22mRo2Xmo6Yx90Em2rGNAYlAdjTeI/edit?usp=drive_web");
postMessage("https://www.daddyleagues.com/ams/schedules");
this.res.end();
}

Expand Down