aboutsummaryrefslogtreecommitdiffstats
path: root/bot/converters.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/converters.py')
-rw-r--r--bot/converters.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bot/converters.py b/bot/converters.py
index d8df44534..05b7d55d9 100644
--- a/bot/converters.py
+++ b/bot/converters.py
@@ -583,8 +583,9 @@ class DayDuration(Converter):
The following formats are accepted:
- H:M
- - H:M am/pm
- - H am/pm
+ - H:Mam/pm
+ - HMam/pm
+ - Ham/pm
- H
where `H` represents Hours and `M` represents Minutes.
@@ -598,11 +599,11 @@ class DayDuration(Converter):
async def convert(self, _ctx: Context, argument: str) -> datetime:
"""Attempts to converting `argument` to an UTC datetime object."""
- match = self.TIME_RE.fullmatch(argument).groups()
+ match = self.TIME_RE.fullmatch(argument)
if not match:
raise BadArgument(f"`{argument}` is not a valid time duration string.")
- hour_12, minute_12, meridiem, hour_24, minute_24 = match
+ hour_12, minute_12, meridiem, hour_24, minute_24 = match.groups()
time = None
if hour_12 and meridiem and minute_12: