From 8d7b77947424cedb9bd5980d477bc73854f282f3 Mon Sep 17 00:00:00 2001 From: retoor Date: Sat, 30 Nov 2024 17:14:47 +0000 Subject: [PATCH] feat: add ragnar check function to validate user input before processing --- src/ragnar/bot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ragnar/bot.py b/src/ragnar/bot.py index 14c1a5d..239372b 100644 --- a/src/ragnar/bot.py +++ b/src/ragnar/bot.py @@ -112,9 +112,8 @@ class Bot: def is_comments_sus(self, rant_id): log.info("Checking if comments are sus of rant {}.".format(rant_id)) rant = self.api.get_rant(rant_id) - if rant.get("num_comments", 0) == 0: - return False for comment in rant.get("comments", []): + print("Checking if sus comment: ", comment['body']) if self.is_sus_content(comment.get("body", "")): return True return False