Remove of magic number
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 59s
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 59s
This commit is contained in:
parent
fdf115b4e1
commit
6970401d14
@ -13,6 +13,7 @@ class Bot:
|
|||||||
self.password = password
|
self.password = password
|
||||||
self.name = self.username.split("@")[0]
|
self.name = self.username.split("@")[0]
|
||||||
self.rant_history = []
|
self.rant_history = []
|
||||||
|
self.amount_of_rants_to_check = 5
|
||||||
names = {
|
names = {
|
||||||
"no-spam": "anna",
|
"no-spam": "anna",
|
||||||
"no-spam1": "ira",
|
"no-spam1": "ira",
|
||||||
@ -100,7 +101,7 @@ class Bot:
|
|||||||
|
|
||||||
def fight(self):
|
def fight(self):
|
||||||
self.rsleepii()
|
self.rsleepii()
|
||||||
rants = self.api.get_rants("recent", 5, 0)
|
rants = self.api.get_rants("recent", self.amount_of_rants_to_check, 0)
|
||||||
for rant in rants:
|
for rant in rants:
|
||||||
if rant["id"] in self.rant_history:
|
if rant["id"] in self.rant_history:
|
||||||
log.debug("{}: Already checked rant {}.".format(self.name, rant["id"]))
|
log.debug("{}: Already checked rant {}.".format(self.name, rant["id"]))
|
||||||
|
Loading…
Reference in New Issue
Block a user