Add NSFW check to reddit follow
This commit is contained in:
parent
46a9f0342c
commit
e17f4daf0e
1 changed files with 7 additions and 0 deletions
|
@ -81,6 +81,13 @@ class RedditCog(Scale):
|
|||
await ctx.send("Cannot follow more than 12 Subreddits", ephemeral=True)
|
||||
return
|
||||
|
||||
if subreddit.over18 and not channel.nsfw:
|
||||
await ctx.send(
|
||||
"Subreddit is nsfw, but channel is not. Mark the channel NSFW first.",
|
||||
ephemeral=True,
|
||||
)
|
||||
return
|
||||
|
||||
sr = await Subreddit.find_one(q(display_name=subreddit.display_name))
|
||||
if not sr:
|
||||
sr = Subreddit(display_name=subreddit.display_name, over18=subreddit.over18)
|
||||
|
|
Loading…
Add table
Reference in a new issue