From abef45524b67e8d03486c9694abe9fcd36f9a713 Mon Sep 17 00:00:00 2001 From: Dalton Date: Fri, 7 Dec 2018 20:55:23 -0800 Subject: [PATCH] maybe just the json.data --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 8d1eb5a..acff2c7 100644 --- a/bot.js +++ b/bot.js @@ -186,7 +186,7 @@ function imgurRequest(subreddit, page_max) { // Abstracted Reddit Json media grab. function handleRedditJson(data) { let json = data.json(); - if(json.data.children) { + if(json.data) { for (let i = 0; i < json.data.children.length; i++) { let rand = getRandomInt(0, json.data.children.length - 1);