Currently, I am trying to implement a command for a bot that when called upon will get a random post from a subreddit however I've run into an issue. I don't want NSFW posts to be able to be posted in none NSFW channels. Is there a way could tell if the post is NSFW? I'm using SnekFetch.
sf.get(`https://www.reddit.com/r/${args[0]}/random.json?limit=1`).then(res => {
const url = res.body[0].data.children[0].data.url
This is my current way of getting a Reddit post. Any help is appreciated. Also, any recommendations on a better request handler is also fine. I'm open to anything. Thanks so much.!