diff options
-rwxr-xr-x | main.py | 2 | ||||
-rw-r--r-- | telegram_bot/__init__.py | 5 |
2 files changed, 3 insertions, 4 deletions
@@ -52,7 +52,7 @@ async def run_record_stats(): while True: t = time.localtime() if t.tm_hour == 5: # only at 05:00 - await recordStatsCommand.handle(None) + await record_stats_command.handle(None) await asyncio.sleep(60 * 60) # 1 hour async def run_all(): diff --git a/telegram_bot/__init__.py b/telegram_bot/__init__.py index 95b7af8..1c68ade 100644 --- a/telegram_bot/__init__.py +++ b/telegram_bot/__init__.py @@ -56,7 +56,6 @@ class TelegramBot: class ExceptionHandler(telebot.ExceptionHandler): def handle(self, exception): - logging.error('Exception happened: {}'.format(str(exception))) - print(traceback.format_exc()) - sys.exit('Exiting with telebot exception') + logging.error('TeleBot exception happened: {}'.format(str(exception))) + logging.error(traceback.format_exc()) return True
\ No newline at end of file |