maybe just the json.data

This commit is contained in:
Dalton
2018-12-07 20:55:23 -08:00
parent f83e6f29f7
commit abef45524b

2
bot.js
View File

@@ -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);