From 8130b34fe0d9c59b75294844b9f05942a4e6b5ad Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 30 Jan 2021 22:24:36 +0000 Subject: Protect against overflows caused by large expirations --- bot/converters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/converters.py b/bot/converters.py index d0a9731d6..0d9a519df 100644 --- a/bot/converters.py +++ b/bot/converters.py @@ -350,7 +350,7 @@ class Duration(DurationDelta): try: return now + delta - except ValueError: + except (ValueError, OverflowError): raise BadArgument(f"`{duration}` results in a datetime outside the supported range.") -- cgit v1.2.3