|
|
@ -27,7 +27,8 @@ module.exports = class redditCommand extends Command {
|
|
|
|
if (!response.data)
|
|
|
|
if (!response.data)
|
|
|
|
return message.say('Not a valid subreddit')
|
|
|
|
return message.say('Not a valid subreddit')
|
|
|
|
while (response.data.children[i].data.post_hint !== 'image') {
|
|
|
|
while (response.data.children[i].data.post_hint !== 'image') {
|
|
|
|
i = Math.floor((Math.random() * 100) + 1);
|
|
|
|
i = Math.floor((Math.random() * response.data.children.length));
|
|
|
|
|
|
|
|
|
|
|
|
a++
|
|
|
|
a++
|
|
|
|
if (a == 5)
|
|
|
|
if (a == 5)
|
|
|
|
return message.say("Could not find any images")
|
|
|
|
return message.say("Could not find any images")
|
|
|
|