refactor: replace magic number 86400 with named constant SESSION_TTL in auth module

This commit is contained in:
retoor 2024-11-27 16:02:18 +00:00
parent 1325644f4d
commit 45f315b443

View File

@ -13,6 +13,7 @@ class Bot:
self.password = password
self.name = self.username.split("@")[0]
self.rant_history = []
self.amount_of_rants_to_check = 5
names = {
"no-spam": "anna",
"no-spam1": "ira",
@ -100,7 +101,7 @@ class Bot:
def fight(self):
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:
if rant["id"] in self.rant_history:
log.debug("{}: Already checked rant {}.".format(self.name, rant["id"]))