aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/moderation.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/cogs/moderation.py b/bot/cogs/moderation.py
index 457eac2bb..e0a5f71a9 100644
--- a/bot/cogs/moderation.py
+++ b/bot/cogs/moderation.py
@@ -756,12 +756,10 @@ class Moderation(Scheduler, Cog):
Returns a boolean indicator of whether the DM was successful.
"""
- expires_at = format_infraction(expires_at) if expires_at else "N/A"
-
embed = Embed(
description=textwrap.dedent(f"""
**Type:** {infr_type.capitalize()}
- **Expires:** {expires_at}
+ **Expires:** {expires_at or "N/A"}
**Reason:** {reason or "No reason provided."}
"""),
colour=Colour(Colours.soft_red)
@@ -836,6 +834,9 @@ class Moderation(Scheduler, Cog):
reason = infraction["reason"]
expiry = infraction["expires_at"]
+ if expiry:
+ expiry = format_infraction(expiry)
+
dm_result = ""
dm_log_text = ""
log_content = None