diff --git a/commands/random/meme.js b/commands/random/meme.js index 503a5acf..1a73392a 100644 --- a/commands/random/meme.js +++ b/commands/random/meme.js @@ -12,7 +12,7 @@ module.exports = class MemeCommand extends SubredditCommand { description: 'Responds with a random meme.', details: `**Subreddits:** ${subreddits.join(', ')}`, clientPermissions: ['ATTACH_FILES'], - postType: 'image', + postType: ['image', 'rich:video'], args: [ { key: 'subreddit', diff --git a/package.json b/package.json index de89aee4..6adcceb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "92.2.3", + "version": "92.2.4", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": { diff --git a/structures/commands/Subreddit.js b/structures/commands/Subreddit.js index a71df76b..8e86f8f2 100644 --- a/structures/commands/Subreddit.js +++ b/structures/commands/Subreddit.js @@ -6,7 +6,7 @@ module.exports = class SubredditCommand extends Command { super(client, info); this.subreddit = info.subreddit; - this.postType = info.postType; + this.postType = Array.isArray(info.postType) ? info.postType : [info.postType]; } async run(msg, { subreddit }) { @@ -38,7 +38,7 @@ module.exports = class SubredditCommand extends Command { const posts = body.data.children.filter(post => { if (!post.data) return false; if (!nsfw && post.data.over_18) return false; - return (this.postType ? post.data.post_hint === this.postType : true) && post.data.url && post.data.title; + return (this.postType ? this.postType.includes(post.data.post_hint) : true) && post.data.url && post.data.title; }); if (!posts.length) return null; return {