self.pick() is now called inside post() instead of main_loop()
This commit is contained in:
parent
da2cce36fb
commit
8594a388d8
@ -195,8 +195,9 @@ class YandereBot:
|
|||||||
# popping it at index 0. This should handle any error that might occur while posting.
|
# 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.
|
# 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
|
# Post
|
||||||
|
picked = self.pick()
|
||||||
self._post(picked)
|
self._post(picked)
|
||||||
|
|
||||||
# After a successful post
|
# After a successful post
|
||||||
@ -239,7 +240,7 @@ class YandereBot:
|
|||||||
def main_loop(self):
|
def main_loop(self):
|
||||||
sleep_seconds = self.settings["settings_behavior"]["retry_seconds"]
|
sleep_seconds = self.settings["settings_behavior"]["retry_seconds"]
|
||||||
while self.can_post():
|
while self.can_post():
|
||||||
picked = self.post(self.pick())
|
picked = self.post()
|
||||||
self.after_post(picked)
|
self.after_post(picked)
|
||||||
if self.can_post():
|
if self.can_post():
|
||||||
self.eventSleep.wait(sleep_seconds)
|
self.eventSleep.wait(sleep_seconds)
|
||||||
|
Reference in New Issue
Block a user