From 037e133759088c4015b087b1c1d0df2c99c103e9 Mon Sep 17 00:00:00 2001 From: Anon Date: Wed, 31 Aug 2022 01:22:42 -0700 Subject: [PATCH] Fixed output logic --- src/yandere_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yandere_bot.py b/src/yandere_bot.py index 83db957..acaeae0 100644 --- a/src/yandere_bot.py +++ b/src/yandere_bot.py @@ -125,7 +125,7 @@ class YandereBot: picked_url = picked["file_url"] if picked else None picked_path = picked["full_path"] if picked else None picked_nsfw = picked["nsfw"] if picked else None - picked_index = (self.currentIndexCount % len(self.settings_post)) - 1 + picked_index = max(0, self.currentIndexCount - 1) % len(self.settings_post) next_selection_seconds = max(0, int(time_diff_seconds(date_next_selection, date_selection))) print("[Profile]", picked_name, "[Index]", picked_index)