Switch back to hot in meme

This commit is contained in:
Daniel Odendahl Jr
2018-10-04 23:44:09 +00:00
parent 7c86db4325
commit 66b2d2ef67
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "92.2.4",
"version": "92.2.5",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {
+2 -6
View File
@@ -28,12 +28,8 @@ module.exports = class SubredditCommand extends Command {
async random(subreddit, nsfw) {
const { body } = await request
.get(`https://www.reddit.com/r/${subreddit}/top.json`)
.query({
sort: 'top',
t: 'day',
limit: 100
});
.get(`https://www.reddit.com/r/${subreddit}/hot.json`)
.query({ limit: 100 });
if (!body.data.children.length) return null;
const posts = body.data.children.filter(post => {
if (!post.data) return false;