"GetNewPosts" the option "timeframe: 'week' but it still fetches ALL post and not that submitted in a Week
Additional info
Discord message: _I experienced the same. Got a timeframe "week" but it fetches all posts. I allready told <@892039441093365801> about it. Seems to be a Problem with ReddtiAPI maybe?
This is how i got around:
Details
"GetNewPosts" the option "timeframe: 'week' but it still fetches ALL post and not that submitted in a Week
Additional info
Discord message: _I experienced the same. Got a timeframe "week" but it fetches all posts. I allready told <@892039441093365801> about it. Seems to be a Problem with ReddtiAPI maybe? This is how i got around:
> const oneWeekAgo = Date.now() - 7 24 60 60 1000; > > YOUR CODE >
> // Filter timeframe before return > const recentPosts = posts.filter(post => { > const postCreatedAt = new Date(post.createdAt).getTime(); > return postCreatedAt >= oneWeekAgo;_
Message author: .robmc
Discord link: https://discord.com/channels/1050224141732687912/1050227353311248404/1295649436034269255