parent
f51ac60a2e
commit
0d8d436549
@ -162,8 +162,11 @@ class Bot:
|
||||
return True
|
||||
return False
|
||||
|
||||
def mark_as_sus(self, rant):
|
||||
self.api.post_comment(rant["id"], self.mark_text)
|
||||
def mark_as_sus(self, rant,is_flagged_by_ai):
|
||||
mark_text = self.mark_text
|
||||
if is_flagged_by_ai:
|
||||
mark_text += "\n* Flagged by AI."
|
||||
self.api.post_comment(rant["id"],mark_text)
|
||||
|
||||
def fight(self):
|
||||
self.rsleepii()
|
||||
@ -172,7 +175,7 @@ class Bot:
|
||||
if rant["id"] in self.rant_history:
|
||||
log.debug("{}: Already checked rant {}.".format(self.name, rant["id"]))
|
||||
continue
|
||||
|
||||
flagged_by_id = False
|
||||
if not self.is_user_sus(rant["user_username"]):
|
||||
log.info(
|
||||
"{}: User {} is trusted.".format(self.name, rant["user_username"])
|
||||
@ -186,14 +189,17 @@ class Bot:
|
||||
pass
|
||||
elif not self.is_sus_rant(rant["id"], rant["text"]):
|
||||
log.info(
|
||||
"{}: Rant by {} is not sus.".format(
|
||||
"{}: Rant by {} is not sus by traditional method..".format(
|
||||
self.name, rant["user_username"]
|
||||
)
|
||||
)
|
||||
continue
|
||||
|
||||
if not vic.is_spam(rant['text']) >= 5:
|
||||
continue
|
||||
else:
|
||||
log.info(
|
||||
"{}: Rant by {} is sus according to AI.".format(self.name, rant["user_username"]))
|
||||
log.warning(
|
||||
"{}: Rant is not {} flagged as sus yet.".format(
|
||||
"{}: Rant by {} is not flagged as sus yet but should be.".format(
|
||||
self.name, rant["user_username"]
|
||||
)
|
||||
)
|
||||
@ -202,7 +208,7 @@ class Bot:
|
||||
self.name, rant["user_username"]
|
||||
)
|
||||
)
|
||||
self.mark_as_sus(rant)
|
||||
self.mark_as_sus(rant,flagged_by_id)
|
||||
self.down_vote_rant(rant)
|
||||
self.rant_history.append(rant["id"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user