From 7228461ab98c537369940573c92e407162ed6db7 Mon Sep 17 00:00:00 2001 From: lzzy12 Date: Sun, 13 Oct 2019 21:14:47 +0530 Subject: [PATCH] Cast time formats to int Signed-off-by: lzzy12 --- bot/helper/ext_utils/bot_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/helper/ext_utils/bot_utils.py b/bot/helper/ext_utils/bot_utils.py index 83a51fa..c1fc21b 100644 --- a/bot/helper/ext_utils/bot_utils.py +++ b/bot/helper/ext_utils/bot_utils.py @@ -95,15 +95,18 @@ def get_readable_message(progress_list: list = None): def get_readable_time(seconds: int) -> str: result = '' (days, remainder) = divmod(seconds, 86400) + days = int(days) if days != 0: result += f'{days}d' (hours, remainder) = divmod(remainder, 3600) + hours = int(hours) if hours != 0: result += f'{hours}h' (minutes, seconds) = divmod(remainder, 60) + minutes = int(minutes) if minutes != 0: result += f'{minutes}m' - + seconds = int(seconds) result += f'{seconds}s' return result