Added ragnar check.
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 56s
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 56s
This commit is contained in:
parent
2f57178a51
commit
0045264250
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user