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 -2
View File
@@ -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}
`;
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "91.12.3",
"version": "91.12.4",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {
+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;