Fixed ragnar mention.
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 1m15s
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 1m15s
This commit is contained in:
parent
dbdcb93cab
commit
b3ddac8f94
@ -116,6 +116,9 @@ class Bot:
|
||||
rant = self.api.get_rant(rant_id)
|
||||
for comment in rant.get("comments", []):
|
||||
print("Checking if sus comment: ", comment["body"])
|
||||
if '@ragnar' in comment.get('body',''):
|
||||
print("Ragnar is mentioned, so flagging as sus comment.")
|
||||
return True
|
||||
if comment["user_score"] >= 5:
|
||||
print("User has reputation >= 5 so not sus.")
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user