From b2e843e78153c2f73759f7650a4ac6aa630e6bb3 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 15 Jul 2021 14:57:33 -0400 Subject: [PATCH] Invalid timestring instead of error --- timerole/timerole.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/timerole/timerole.py b/timerole/timerole.py index 0d62cf0..f0eb716 100644 --- a/timerole/timerole.py +++ b/timerole/timerole.py @@ -92,6 +92,9 @@ class Timerole(Cog): await ctx.maybe_send_embed("Error: Invalid time string.") return + if parsed_time is None: + return await ctx.maybe_send_embed("Error: Invalid time string.") + days = parsed_time.days hours = parsed_time.seconds // 60 // 60