From 8594a388d80613c7017d2c13e4dba6b157eecdf0 Mon Sep 17 00:00:00 2001 From: Anon Date: Sun, 19 Mar 2023 18:57:03 -0700 Subject: [PATCH] self.pick() is now called inside post() instead of main_loop() --- fedibot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fedibot.py b/fedibot.py index aec8828..bf91e8a 100644 --- a/fedibot.py +++ b/fedibot.py @@ -195,8 +195,9 @@ class YandereBot: # popping it at index 0. This should handle any error that might occur while posting. # # This function should return 'None' if a post failed, and the picked item from self.listPictures if it succeeded. - def post(self, picked): + def post(self): # Post + picked = self.pick() self._post(picked) # After a successful post @@ -239,7 +240,7 @@ class YandereBot: def main_loop(self): sleep_seconds = self.settings["settings_behavior"]["retry_seconds"] while self.can_post(): - picked = self.post(self.pick()) + picked = self.post() self.after_post(picked) if self.can_post(): self.eventSleep.wait(sleep_seconds)