SubredditQuarantine

class praw.models.reddit.subreddit.SubredditQuarantine(subreddit: praw.models.Subreddit)

Provides subreddit quarantine related methods.

To opt-in into a quarantined subreddit:

reddit.subreddit("test").quaran.opt_in()
__init__(subreddit: praw.models.Subreddit)

Initialize a SubredditQuarantine instance.

Parameters

subreddit – The Subreddit associated with the quarantine.

opt_in()

Permit your user access to the quarantined subreddit.

Usage:

subreddit = reddit.subreddit("QUESTIONABLE")
next(subreddit.hot())  # Raises prawcore.Forbidden

subreddit.quaran.opt_in()
next(subreddit.hot())  # Returns Submission
opt_out()

Remove access to the quarantined subreddit.

Usage:

subreddit = reddit.subreddit("QUESTIONABLE")
next(subreddit.hot())  # Returns Submission

subreddit.quaran.opt_out()
next(subreddit.hot())  # Raises prawcore.Forbidden