From 6970401d1441d2991eb1cd98dab4279d1db199b2 Mon Sep 17 00:00:00 2001 From: retoor Date: Wed, 27 Nov 2024 17:02:18 +0100 Subject: [PATCH] Remove of magic number --- src/ragnar/bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ragnar/bot.py b/src/ragnar/bot.py index 77cd7a2..33a6edf 100644 --- a/src/ragnar/bot.py +++ b/src/ragnar/bot.py @@ -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"]))