ItemModeration¶
ItemModeration
is a utility class to aid in moderation comments, submissions and modmail.
Specific implementations such as CommentModeration
exist as well, and the base class may be used by certain models.
- class apraw.models.ItemModeration(reddit: Reddit, item: apraw.models.helpers.apraw_base.aPRAWBase)¶
A helper class to moderate comments, submissions and modmail.
- 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 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 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