ModNote#
- class praw.models.ModNote(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])#
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
actionIf this note represents a moderator action, this field indicates the type of action. For example,
"banuser"if the action was banning a user.created_atTime the moderator note was created, represented in Unix Time.
descriptionIf 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.
detailsIf 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.
idThe ID of the moderator note.
labelThe label applied to the note, currently one of:
"ABUSE_WARNING","BAN","BOT_BAN","HELPFUL_USER","PERMA_BAN","SOLID_CONTRIBUTOR","SPAM_WARNING","SPAM_WATCH", orNone.moderatorThe moderator who created the note.
noteThe text of the note.
reddit_idThe fullname of the object this note is attributed to, or
Noneif not set. If this note represents a moderators action, this is the fullname of the object the action was performed on.subredditThe subreddit this note belongs to.
typeThe type of note, currently one of:
"APPROVAL","BAN","CONTENT_CHANGE","INVITE","MUTE","NOTE","REMOVAL", or"SPAM".userThe redditor the note is for.
- __init__(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])#
Initialize a
PRAWBaseinstance.- 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()