Skip to content
Back to top
View this page

# ModNote

class praw.models.ModNote(reddit: praw.Reddit, _data: Dict[str, Any] | None)

  Represent a moderator note.

  Typical Attributes

  Note

  This table describes attributes that typically belong to objects of this class. PRAW dynamically provides the attributes that Reddit returns via the API. Since those attributes are subject to change on Reddit’s end, PRAW makes no effort to document any new/removed/changed attributes, other than to instruct you on how to discover what is available. As a result, this table of attributes may not be complete. See Determine Available Attributes of an Object for detailed information.

  If you would like to add an attribute to this table, feel free to open a pull request.

  Attribute | Description
  --- | ---
  `action` | If this note represents a moderator action, this field indicates the type of action. For example, `"banuser"` if the action was banning a user.
  `created_at` | Time the moderator note was created, represented in Unix Time.
  `description` | If this note represents a moderator action, this field indicates the description of the action. For example, if the action was banning the user, this is the ban reason.
  `details` | If this note represents a moderator action, this field indicates the details of the action. For example, if the action was banning the user, this is the duration of the ban.
  `id` | The ID of the moderator note.
  `label` | The label applied to the note, currently one of: `"ABUSE_WARNING"`, `"BAN"`, `"BOT_BAN"`, `"HELPFUL_USER"`, `"PERMA_BAN"`, `"SOLID_CONTRIBUTOR"`, `"SPAM_WARNING"`, `"SPAM_WATCH"`, or `None`.
  `moderator` | The moderator who created the note.
  `note` | The text of the note.
  `reddit_id` | The fullname of the object this note is attributed to, or `None` if not set. If this note represents a moderators action, this is the fullname of the object the action was performed on.
  `subreddit` | The subreddit this note belongs to.
  `type` | The type of note, currently one of: `"APPROVAL"`, `"BAN"`, `"CONTENT_CHANGE"`, `"INVITE"`, `"MUTE"`, `"NOTE"`, `"REMOVAL"`, or `"SPAM"`.
  `user` | The redditor the note is for.

  __init__(reddit: praw.Reddit, _data: Dict[str, Any] | None)

    Initialize a `PRAWBase` instance.

    Parameters:

      reddit – An instance of `Reddit`.

  delete()

    Delete this note.

    For example, to delete the last note for u/spez from r/test, try:

        for note in reddit.subreddit("test").mod.notes("spez"):
            note.delete()

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

    Return an instance of `cls` from `data`.

    Parameters:

      - data – The structured data.

      - reddit – An instance of `Reddit`.