Пример #1
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'])
Пример #2
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'])
Пример #3
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'])
Пример #4
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'])