From 911b9482a71b0dd6f3cd88d29174bff1c8553d67 Mon Sep 17 00:00:00 2001 From: HypoxiE Date: Sat, 23 Aug 2025 10:20:05 +0700 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BD=D0=B5=D1=82=D0=BE=D1=87=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D1=8C=20=D1=82=D0=B8=D0=BF=D0=BE=D0=B2=20TimeForma?= =?UTF-8?q?tter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CoreMod.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CoreMod.py b/src/CoreMod.py index f2e56cd..01780b5 100644 --- a/src/CoreMod.py +++ b/src/CoreMod.py @@ -144,7 +144,7 @@ class AnyBots(commands.Bot): def to_dict(self): return self.time_units - time_units = {'years': 0, 'months': 0, 'weeks': 0, 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 0} + time_units = {'years': 0.0, 'months': 0.0, 'weeks': 0.0, 'days': 0.0, 'hours': 0.0, 'minutes': 0.0, 'seconds': 0.0} if any([years, months, weeks, days, hours, minutes, seconds]): time_units = {'years': years, 'months': months, 'weeks': weeks, 'days': days, 'hours': hours, 'minutes': minutes, 'seconds': seconds} @@ -181,6 +181,7 @@ class AnyBots(commands.Bot): 'd': 'days', 'h': 'hours', 'm': 'minutes', + 'sec': 'seconds', 's': 'seconds', 'c': 'seconds' } @@ -198,7 +199,7 @@ class AnyBots(commands.Bot): matches = re.findall(pattern, time_str) for value, _, unit in matches: - time_units[unit] += value + time_units[unit] += float(value) return FormatedTime(time_units)