mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Switch back to hot in meme
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "92.2.4",
|
"version": "92.2.5",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -28,12 +28,8 @@ module.exports = class SubredditCommand extends Command {
|
|||||||
|
|
||||||
async random(subreddit, nsfw) {
|
async random(subreddit, nsfw) {
|
||||||
const { body } = await request
|
const { body } = await request
|
||||||
.get(`https://www.reddit.com/r/${subreddit}/top.json`)
|
.get(`https://www.reddit.com/r/${subreddit}/hot.json`)
|
||||||
.query({
|
.query({ limit: 100 });
|
||||||
sort: 'top',
|
|
||||||
t: 'day',
|
|
||||||
limit: 100
|
|
||||||
});
|
|
||||||
if (!body.data.children.length) return null;
|
if (!body.data.children.length) return null;
|
||||||
const posts = body.data.children.filter(post => {
|
const posts = body.data.children.filter(post => {
|
||||||
if (!post.data) return false;
|
if (!post.data) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user