SubredditCollectionsModeration

class praw.models.reddit.collections.SubredditCollectionsModeration(reddit: Reddit, sub_fullname: str, _data: Optional[Dict[str, Any]] = None)

Class to represent moderator actions on a Subreddit’s Collections.

Obtain an instance via:

reddit.subreddit("SUBREDDIT").collections.mod
__init__(reddit: Reddit, sub_fullname: str, _data: Optional[Dict[str, Any]] = None)

Initialize the SubredditCollectionsModeration instance.

create(title: str, description: str)

Create a new Collection.

The authenticated account must have appropriate moderator permissions in the subreddit this collection belongs to.

Parameters:
  • title – The title of the collection, up to 300 characters.
  • description – The description, up to 500 characters.
Returns:

The newly created Collection.

Example usage:

my_sub = reddit.subreddit("SUBREDDIT")
new_collection = my_sub.collections.mod.create("Title", "desc")
new_collection.mod.add_post("bgibu9")

See also

delete()

classmethod parse(data: Dict[str, Any], reddit: Reddit) → Any

Return an instance of cls from data.

Parameters:
  • data – The structured data.
  • reddit – An instance of Reddit.