diff --git a/src/ragnar/bot.py b/src/ragnar/bot.py index 1d00e33..cd80c32 100644 --- a/src/ragnar/bot.py +++ b/src/ragnar/bot.py @@ -126,12 +126,13 @@ class Bot: if rant["id"] in self.rant_history: log.debug("{}: Already checked rant {}.".format(self.name, rant["id"])) continue - else: - self.rant_history.append(rant["id"]) + + if not self.is_user_sus(rant["user_username"]): log.info( "{}: User {} is trusted.".format(self.name, rant["user_username"]) ) + self.rant_history.append(rant["id"]) continue elif self.is_comments_sus(rant["id"]): @@ -144,6 +145,7 @@ class Bot: ) continue if self.is_flagged_as_sus(rant["id"], rant.get("num_comments")): + self.rant_history.append(rant["id"]) continue log.warning( "{}: Rant is not {} flagged as sus yet.".format( @@ -157,7 +159,8 @@ class Bot: ) self.mark_as_sus(rant) self.down_vote_rant(rant) - + self.rant_history.append(rant["id"]) + def down_vote_rant(self, rant): log.warning("Downvoting rant by {}.".format(rant["user_username"])) log.debug(json.loads(self.api.post_rant_vote(rant["id"], -1)))