Comment Moderation¶
- class apraw.models.CommentModeration(reddit: Reddit, comment: apraw.models.reddit.comment.Comment)¶
A helper class to moderate comments.
- async approve()¶
Approve the Reddit item.
- Returns
resp – The API response JSON.
- Return type
Dict
- async distinguish(how: apraw.models.enums.distinguishment_option.DistinguishmentOption = 'yes', sticky: bool = False)¶
Distinguish the Reddit item.
- Parameters
how (DistinguishmentOption) – The type of distinguishment to be added to the item.
sticky (bool, optional) – Whether the item should be stickied.
- Returns
resp – The API response JSON.
- Return type
Dict
- property fullname: str¶
Retrieve the fullname of the item this helper performs requests for.
- Returns
fullname – The ID prepended with the kind of the item this helper belongs to.
- Return type
str
- async ignore_reports()¶
Ignore reports on the Reddit item.
- Returns
resp – The API response JSON.
- Return type
Dict
- async lock()¶
Lock the item from further replies.
- Returns
resp – The API response JSON.
- Return type
Dict
- async remove(spam: bool = False, mod_note: Optional[str] = '', reason: Optional[Union[str, apraw.models.subreddit.removal_reasons.SubredditRemovalReason]] = None)¶
Remove the Reddit item.
- Parameters
spam (bool) – When
True
, use the removal to help train the Subreddit’s spam filter (default:False
).mod_note (Optional[str]) – A message for the other moderators.
reason (str or SubredditRemovalReason) – The removal reason ID or a subreddit removal reason to add.
- Returns
resp – The API response JSON or a tuple of dictionaries if a removal reason / mod note was added as well.
- Return type
Dict or Tuple
- async show_comment()¶
Mark a comment that it should not be collapsed because of crowd control.
The comment could still be collapsed for other reasons.
- Returns
resp – The API response JSON.
- Return type
Dict
- async undistinguish()¶
Undistinguish the Reddit item.
- Returns
resp – The API response JSON.
- Return type
Dict
- async unignore_reports()¶
Unignore previously ignored reports on the Reddit item.
- Returns
resp – The API response JSON.
- Return type
Dict
- async unlock()¶
Unlock the item from further replies.
- Returns
resp – The API response JSON.
- Return type
Dict