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'])
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'])