WikiPageModeration

class praw.models.reddit.wikipage.WikiPageModeration(wikipage: praw.models.reddit.wikipage.WikiPage)

Provides a set of moderation functions for a WikiPage.

For example, to add spez as an editor on the wikipage praw_test try:

reddit.subreddit("test").wiki["praw_test"].mod.add("spez")
__init__(wikipage: praw.models.reddit.wikipage.WikiPage)

Create a WikiPageModeration instance.

Parameters:wikipage – The wikipage to moderate.
add(redditor: praw.models.reddit.redditor.Redditor)

Add an editor to this WikiPage.

Parameters:redditor – A redditor name (e.g., "spez") or Redditor instance.

To add "spez" as an editor on the wikipage "praw_test" try:

reddit.subreddit("test").wiki["praw_test"].mod.add("spez")
remove(redditor: praw.models.reddit.redditor.Redditor)

Remove an editor from this WikiPage.

Parameters:redditor – A redditor name (e.g., "spez") or Redditor instance.

To remove "spez" as an editor on the wikipage "praw_test" try:

reddit.subreddit("test").wiki["praw_test"].mod.remove("spez")
settings() → Dict[str, Any]

Return the settings for this WikiPage.

update(listed: bool, permlevel: int, **other_settings) → Dict[str, Any]

Update the settings for this WikiPage.

Parameters:
  • listed – (boolean) Show this page on page list.
  • permlevel – (int) Who can edit this page? (0) use subreddit wiki permissions, (1) only approved wiki contributors for this page may edit (see WikiPageModeration.add()), (2) only mods may edit and view
  • other_settings – Additional keyword arguments to pass.
Returns:

The updated WikiPage settings.

To set the wikipage praw_test in /r/test to mod only and disable it from showing in the page list, try:

reddit.subreddit("test").wiki["praw_test"].mod.update(listed=False,
                                                      permlevel=2)