From 73c910488248d9a3eb1cc378b0de7264ae449e90 Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Fri, 24 May 2024 04:26:58 -0400 Subject: [PATCH] fix(aurora): cast to string before checking length to avoid typeerrors when reason is None --- aurora/aurora.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aurora/aurora.py b/aurora/aurora.py index e22776a..ec8a0e6 100644 --- a/aurora/aurora.py +++ b/aurora/aurora.py @@ -1185,7 +1185,7 @@ class Aurora(commands.Cog): field_name = f"Case #{mod.id:,} ({str.title(mod.type)})" field_value = f"**Target:** `{target.name}` ({target.id})\n**Moderator:** `{moderator.name}` ({moderator.id})" - if len(mod.reason) > 125: + if len(str(mod.reason)) > 125: field_value += f"\n**Reason:** `{str(mod.reason)[:125]}...`" else: field_value += f"\n**Reason:** `{str(mod.reason)}`"