Fix reddit

This commit is contained in:
Daniel Odendahl Jr
2018-09-25 23:20:57 +00:00
parent 7a6bbebee3
commit a4748744c6
3 changed files with 3 additions and 3 deletions
+1
View File
@@ -34,6 +34,7 @@ module.exports = class SubredditCommand extends Command {
t: 'day',
limit: 100
});
if (!body.data.children.length) return null;
const posts = body.data.children.filter(post => {
if (!post.data) return false;
if (!nsfw && post.data.over_18) return false;