maybe just the json.data
This commit is contained in:
2
bot.js
2
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);
|
||||
|
||||
|
Reference in New Issue
Block a user