From c8a32058f1cb9c8b3a85d481d0b95db74084fab3 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 15 Dec 2023 22:13:38 -0500 Subject: [PATCH] fix(moderation): silently fail if an overflow error is encountered --- moderation/moderation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index 9b76746..3f26fea 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -1719,7 +1719,10 @@ class Moderation(commands.Cog): timestamp = round(case['timestamp'] / 1000) if case['duration']: - duration = timedelta(seconds=round(float(case['duration']) / 1000)) + try: + duration = timedelta(seconds=round(float(case['duration']) / 1000)) + except OverflowError: + continue if case['resolved']: resolved = 1