Bots update.
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 1m25s
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 1m25s
This commit is contained in:
parent
f447a2d0bf
commit
2c72163d3c
@ -55,7 +55,7 @@ class Bot:
|
||||
self.api = Api(username=self.username, password=self.password)
|
||||
|
||||
def rsleepii(self):
|
||||
time.sleep(random.randint(1, 3))
|
||||
time.sleep(random.randint(1, 60))
|
||||
|
||||
@method_cache
|
||||
def login(self):
|
||||
@ -91,7 +91,6 @@ class Bot:
|
||||
def is_flagged_as_sus(self, rant_id, num_comments):
|
||||
if not num_comments:
|
||||
return False
|
||||
self.rsleepii()
|
||||
rant = self.api.get_rant(rant_id)
|
||||
for comment in rant.get("comments", []):
|
||||
if self.names.get(self.username, "") in comment.get("body", ""):
|
||||
@ -127,8 +126,8 @@ class Bot:
|
||||
return False
|
||||
|
||||
def mark_as_sus(self, rant):
|
||||
self.rsleepii()
|
||||
self.api.post_comment(rant["id"], self.mark_text)
|
||||
self.rsleepii()
|
||||
|
||||
def fight(self):
|
||||
self.rsleepii()
|
||||
|
Loading…
Reference in New Issue
Block a user