feat: add ragnar check function to validate user input before processing

This commit is contained in:
retoor 2024-11-30 17:14:47 +00:00
parent 040f339d44
commit 8d7b779474

View File

@ -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