mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-06 05:22:30 +12:00
error checking for date parsing
This commit is contained in:
parent
42f3420a7a
commit
41a78b1c6f
|
@ -49,7 +49,10 @@ def parse_time(datetimestring: str):
|
|||
|
||||
|
||||
def parse_time_naive(datetimestring: str):
|
||||
return parser.parse(datetimestring)
|
||||
try:
|
||||
return parser.parse(datetimestring)
|
||||
except:
|
||||
return None
|
||||
|
||||
|
||||
def parse_timedelta(argument: str) -> Optional[relativedelta]:
|
||||
|
|
Loading…
Reference in a new issue