diff --git a/commands/random/reddit.js b/commands/random/reddit.js index 5d75b836..dcc6c527 100644 --- a/commands/random/reddit.js +++ b/commands/random/reddit.js @@ -9,6 +9,7 @@ module.exports = class RedditCommand extends SubredditCommand { group: 'random', memberName: 'reddit', description: 'Responds with a random post from a subreddit.', + clientPermissions: ['EMBED_LINKS'], args: [ { key: 'subreddit', @@ -24,8 +25,6 @@ module.exports = class RedditCommand extends SubredditCommand { return stripIndents` **r/${subreddit}** ${post.title} ${post.url} - - ⬆ ${post.ups} ⬇ ${post.downs} `; } }; diff --git a/package.json b/package.json index a3d26b63..8249b08b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "91.12.3", + "version": "91.12.4", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": { diff --git a/structures/commands/Subreddit.js b/structures/commands/Subreddit.js index 8ab5458a..6b9acfd7 100644 --- a/structures/commands/Subreddit.js +++ b/structures/commands/Subreddit.js @@ -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;