mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Switch back to hot in meme
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "92.2.4",
|
||||
"version": "92.2.5",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user