From 522e3448dffb9ecece90bc698b5545afc5085160 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh <102361830+SeaswimmerTheFsh@users.noreply.github.com> Date: Tue, 20 Jun 2023 12:44:45 -0400 Subject: [PATCH] improved parse_timedelta added units for the singular versions of days, hours, minutes, and seconds - also added abbreivations --- moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moderation.py b/moderation.py index 3745c14..2c9fd2c 100644 --- a/moderation.py +++ b/moderation.py @@ -11,7 +11,7 @@ class Moderation(commands.Cog): components = input_str.split() # Define a dictionary to map time units to their corresponding `timedelta` attribute - units = {"days": "days", "hours": "hours", "minutes": "minutes", "seconds": "seconds"} + units = {"days": "days", "hours": "hours", "minutes": "minutes", "seconds": "seconds", "day": "days", "hour": "hours", "minute": "minutes", "second": "seconds", "d": "days", "h": "hours", "m": "minutes", "s": "seconds"} # Iterate over the components, taking pairs of values and units values_units = zip(components[::2], components[1::2])