Exemplo n.º 1
0
    def _is_transcript_reply(self, praw_r, praw_comment, username):
        if not hasattr(praw_comment, 'parent_id'):
            return False

        parent = praw_r.get_info(thing_id=praw_comment.parent_id)
        if not parent or type(parent) != praw.objects.Comment:
            return False
        return len(parent.body) > 50 and utils.is_comment_owner(parent, username)
Exemplo n.º 2
0
    def _is_transcript_reply(self, praw_r, praw_comment, username):
        if not hasattr(praw_comment, 'parent_id'):
            return False

        parent = praw_r.get_info(thing_id=praw_comment.parent_id)
        if not parent or type(parent) != praw.objects.Comment:
            return False
        return len(parent.body) > 50 and utils.is_comment_owner(
            parent, username)
Exemplo n.º 3
0
 def _check(self, comment):
     if comment.body.lower().find('xkcd.com') == -1:
         return False
     if comment.subreddit.display_name.lower().find('xkcd') != -1:
         return False
     if comment.subreddit.display_name.lower() == 'jerktalkdiamond':
         return False
     if utils.is_comment_owner(comment, self.auth['username']):
         return False
     if utils.has_replied(comment, self.auth['username']):
         return False
     return not utils.has_chain(self.r, comment, self.auth['username'])
Exemplo n.º 4
0
 def _check(self, comment):
     if comment.body.lower().find('xkcd.com') == -1:
         return False
     if comment.subreddit.display_name.lower().find('xkcd') != -1:
         return False
     if comment.subreddit.display_name.lower() == 'jerktalkdiamond':
         return False
     if utils.is_comment_owner(comment, self.auth['username']):
         return False
     if utils.has_replied(comment, self.auth['username']):
         return False
     return not utils.has_chain(self.r, comment, self.auth['username'])
Exemplo n.º 5
0
 def _check(self, submission):
     if submission.is_self:
         if submission.selftext.lower().find('xkcd.com') == -1:
             return False
     else:
         if submission.url.lower().find('xkcd.com') == -1:
             return False
     if submission.subreddit.display_name.lower().find('xkcd') != -1:
         return False
     if submission.subreddit.display_name.lower() == 'jerktalkdiamond':
         return False
     if utils.is_comment_owner(submission, self.auth['username']):
         return False
     if utils.has_replied(submission, self.auth['username']):
         return False
     return not utils.has_chain(self.r, submission, self.auth['username'])
Exemplo n.º 6
0
 def _check(self, submission):
     if submission.is_self:
         if submission.selftext.lower().find('xkcd.com') == -1:
             return False
     else:
         if submission.url.lower().find('xkcd.com') == -1:
             return False
     if submission.subreddit.display_name.lower().find('xkcd') != -1:
         return False
     if submission.subreddit.display_name.lower() == 'jerktalkdiamond':
         return False
     if utils.is_comment_owner(submission, self.auth['username']):
         return False
     if utils.has_replied(submission, self.auth['username']):
         return False
     return not utils.has_chain(self.r, submission, self.auth['username'])
Exemplo n.º 7
0
 def _check(self, mail):
     if utils.has_replied(mail, self.auth['username']):
         return False
     if utils.is_comment_owner(mail, self.auth['username']):
         return False
     return True
Exemplo n.º 8
0
 def _check(self, mail):
     if utils.has_replied(mail, self.auth['username']):
         return False
     if utils.is_comment_owner(mail, self.auth['username']):
         return False
     return True