o
    2gS                     @  s<   d Z ddlmZ ddlmZ ddlmZ G dd deZd	S )
zProvide the ModNote class.    )annotations   )API_PATH   )PRAWBasec                      s*   e Zd ZdZd	 fddZdd Z  ZS )
ModNotea  Represent a moderator note.

    .. include:: ../../typical_attributes.rst

    =============== ====================================================================
    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.
    =============== ====================================================================

    .. _unix time: https://en.wikipedia.org/wiki/Unix_time

    otherreturnboolc                   s8   t || jr| j|jkS t |tr| j|kS t |S )z5Return whether the other instance equals the current.)
isinstance	__class__idstrsuper__eq__)selfr   r    L/home/garg/my-data/venv/lib/python3.10/site-packages/praw/models/mod_note.pyr   0   s
   

zModNote.__eq__c                 C  s2   t | jt | j| jd}| jjtd |d dS )zDelete this note.

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

        .. code-block:: python

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

        )user	subredditnote_id	mod_notes)paramsN)r   r   r   r   _redditdeleter   )r   r   r   r   r   r   8   s
   zModNote.delete)r   r   r	   r
   )__name__
__module____qualname____doc__r   r   __classcell__r   r   r   r   r   	   s    &r   N)r   
__future__r   	endpointsr   baser   r   r   r   r   r   <module>   s
    