fix(aurora): cast to string before checking length to avoid typeerrors when reason is None
This commit is contained in:
parent
5b64ee9578
commit
73c9104882
1 changed files with 1 additions and 1 deletions
|
@ -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)}`"
|
||||
|
|
Loading…
Reference in a new issue