From 0e56063c4a1db63ddd646d6d333c5edd7789b28e Mon Sep 17 00:00:00 2001 From: Anon Date: Wed, 31 Aug 2022 22:20:17 -0700 Subject: [PATCH] Updated module name to be consistent with other bots --- src/main.py | 16 ++++++++-------- src/{yandereBot.py => yandere_bot.py} | 0 2 files changed, 8 insertions(+), 8 deletions(-) rename src/{yandereBot.py => yandere_bot.py} (100%) diff --git a/src/main.py b/src/main.py index b1d4152..c3968c8 100755 --- a/src/main.py +++ b/src/main.py @@ -19,16 +19,16 @@ import sys import argparse import signal -import yandereBot +import yandere_bot import datetime import contextlib -# A class that inherits from either YandereBot from yandereBot module +# A class that inherits from YandereBot from the yandere_bot module # This class is used to handle command line arguments gracefully, and extend functionality quickly # Bot specific changes should be made here (if they are minor enough). # This will be instantiated from the main() function -class YandereBot(yandereBot.YandereBot): +class YandereBot(yandere_bot.YandereBot): # The below settings are required from the configuration module settings_time = None settings_reminder = None @@ -84,7 +84,7 @@ class YandereBot(yandereBot.YandereBot): hour=t.hour, minute=t.minute, second=t.second, microsecond=t.microsecond ) if self.dateNextSelection < self.dateSelection and add_24: - self.dateNextSelection = yandereBot.time_add_seconds(self.dateNextSelection, 60 * 60 * 24) + self.dateNextSelection = yandere_bot.time_add_seconds(self.dateNextSelection, 60 * 60 * 24) except Exception: print("Invalid time format: {}\n\nCorrect date/time format examples:".format(h)) self.print_date_time_example() @@ -101,7 +101,7 @@ class YandereBot(yandereBot.YandereBot): # Check for potential misconfigurations by the user def pass_sanity_test(self): # Calculate pre-timer value - seconds_until_next_pos = yandereBot.time_diff_seconds(self.dateNextSelection, self.dateSelection) + seconds_until_next_pos = yandere_bot.time_diff_seconds(self.dateNextSelection, self.dateSelection) # Possible misconfigurations that will prompt the user to continue pretimer_less_than_zero = seconds_until_next_pos < 0 @@ -250,9 +250,9 @@ if __name__ == "__main__": sys.exit(7) # Exceptions raised from the bot - except yandereBot.Debug: + except yandere_bot.Debug: sys.exit(6) - except yandereBot.BadCfgFile: + except yandere_bot.BadCfgFile: sys.exit(4) - except yandereBot.FailedLogin: + except yandere_bot.FailedLogin: sys.exit(2) diff --git a/src/yandereBot.py b/src/yandere_bot.py similarity index 100% rename from src/yandereBot.py rename to src/yandere_bot.py