Added callback param to post()

This commit is contained in:
Anon 2023-03-19 19:21:02 -07:00
parent 8594a388d8
commit 4759388adb

View File

@ -195,17 +195,17 @@ 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):
def post(self, callback=None):
# Post
picked = self.pick()
self._post(picked)
_picked = callback() if callable(callback) else self.pick()
self._post(_picked)
# After a successful post
self.currentSessionCount += 1
self.consecutive_failed_uploads = 0
# The post was successful
return picked
return _picked
# [BEGIN THE PROGRAM]
def prime_bot(self):