src/reddit_bot.py
def has_already_replied(self, target):
        """Checks if target comment has already been replied by bot.
        Used to prevent multiple replies to the same request.

        Parameters
        ----------
        target : reddit.comment object
            Target Reddit comment.

        Returns
        -------
        bool
            True if parent comment of target is from bot. False otherwise.

        """
        try:
            # implement replace_more()?
            target.refresh()
            for reply in target.replies.list():
                if reply.author == self.username:
                    print("Comment already processed.")
                    return True
            print("Processing comment...")
            return False
        except praw.exceptions.APIException as error:
            print("API Error:", error)
            # Failsafe
            return True
Checks if target comment has already been replied by bot.
        Used to prevent multiple replies to the same request.

        Parameters
        ----------
        target : reddit.comment object
            Target Reddit comment.

        Returns
        -------
        bool
            True if parent comment of target is from bot. False otherwise.

        
Checks if target comment has already been replied by bot.
Used to prevent multiple replies to the same request.

Parameters

target : reddit.comment object
Target Reddit comment.

Returns

bool
True if parent comment of target is from bot. False otherwise.
Checks if target comment has already been replied by bot . Used to prevent multiple replies to the same request . Parameters target : reddit . comment object Target Reddit comment . Returns bool True if parent comment of target is from bot . False otherwise .
def has_already_replied(self, target):
        try:
            target.refresh()
            for reply in target.replies.list():
                if reply.author == self.username:
                    print("Comment already processed.")
                    return True
            print("Processing comment...")
            return False
        except praw.exceptions.APIException as error:
            print("API Error:", error)
            return True
def has_already_replied ( self , target ) : try : target . refresh ( ) for reply in target . replies . list ( ) : if reply . author == self . username : print ( "Comment already processed." ) return True print ( "Processing comment..." ) return False except praw . exceptions . APIException as error : print ( "API Error:" , error ) return True
Checks if target comment has already been replied by bot.
Checks if target comment has already been replied by bot .
"""Checks if target comment has already been replied by bot.
        Used to prevent multiple replies to the same request.

        Parameters
        ----------
        target : reddit.comment object
            Target Reddit comment.

        Returns
        -------
        bool
            True if parent comment of target is from bot. False otherwise.

        """ # implement replace_more()? # Failsafe
self
target