aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/moderation/infraction/management.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/exts/moderation/infraction/management.py b/bot/exts/moderation/infraction/management.py
index 0cb2a8b60..dd44f7dd0 100644
--- a/bot/exts/moderation/infraction/management.py
+++ b/bot/exts/moderation/infraction/management.py
@@ -141,10 +141,11 @@ class ModManagement(commands.Cog):
log_text = ""
if duration is not None and not infraction['active']:
- if reason is None:
+ if (infr_type := infraction['type']) in ('note', 'warning'):
+ await ctx.send(f":x: Cannot edit the expiration of a {infr_type}.")
+ else:
await ctx.send(":x: Cannot edit the expiration of an expired infraction.")
- return
- confirm_messages.append("expiry unchanged (infraction already expired)")
+ return
elif isinstance(duration, str):
request_data['expires_at'] = None
confirm_messages.append("marked as permanent")