From 5f1024c1836d3affc911b95bb4a4897b41a6bcfd Mon Sep 17 00:00:00 2001 From: Dalton Date: Tue, 11 Dec 2018 21:54:45 -0800 Subject: [PATCH] quieted debug and fixed typo in subredditRequest() that i probably accidentally introduced --- bot.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bot.js b/bot.js index 175217b..62069a7 100644 --- a/bot.js +++ b/bot.js @@ -130,7 +130,7 @@ function bestEffortRequest(subpage, page_max) { //let reddit_response = asyncSiteRequest(reddit_url, handleRedditJson); let reddit_response = subredditRequest(subpage); if (reddit_response) { - sendToBotTestingChannel("found content on reddit:" + reddit_response); + //sendToBotTestingChannel("found content on reddit:" + reddit_response); return reddit_response; } @@ -138,7 +138,7 @@ function bestEffortRequest(subpage, page_max) { if (page_max) { imgur_response = imgurRequest(subpage, page_max); if (imgur_response) { - sendToBotTestingChannel("found content on imgur:" + imgur_response); + //sendToBotTestingChannel("found content on imgur:" + imgur_response); return imgur_response } } @@ -148,12 +148,12 @@ function bestEffortRequest(subpage, page_max) { //let redditbooru_response = asyncSiteRequest(redditbooru_url, handleRedditBooruJson); let redditbooru_response = redditbooruRequest(subpage); if (redditbooru_response) { - sendToBotTestingChannel("found content on redditbooru:" + redditbooru_response); + //sendToBotTestingChannel("found content on redditbooru:" + redditbooru_response); return redditbooru_response } // leaving this here for debug. - sendToBotTestingChannel('reddit:' + reddit_response + '\nimgur:' + imgur_response + '\nredditbooru:' + redditbooru_response); + //sendToBotTestingChannel('reddit:' + reddit_response + '\nimgur:' + imgur_response + '\nredditbooru:' + redditbooru_response); return "I couldn't find that, sauce?"; } @@ -260,7 +260,7 @@ function subredditRequest(subreddit) { counter++; - if (json.data.children[i].data.post_hint === "image" || json.data.children[i].data.post_hint === "link" || json.data.children.data.post_hint === "rich:video") { + if (json.data.children[i].data.post_hint === "image" || json.data.children[i].data.post_hint === "link" || json.data.children[i].data.post_hint === "rich:video") { returnText = json.data.children[i].data.url; break; }