aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/moderation/infraction/superstarify.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/moderation/infraction/superstarify.py b/bot/exts/moderation/infraction/superstarify.py
index 8a6d14d41..f5d6259cd 100644
--- a/bot/exts/moderation/infraction/superstarify.py
+++ b/bot/exts/moderation/infraction/superstarify.py
@@ -136,8 +136,9 @@ class Superstarify(InfractionScheduler, Cog):
return
# Set the duration to 1 hour if none was provided
- duration = datetime.datetime.now() + datetime.timedelta(hours=1)
-
+ if not duration:
+ duration = datetime.datetime.now() + datetime.timedelta(hours=1)
+
# Post the infraction to the API
old_nick = member.display_name
infraction_reason = f'Old nickname: {old_nick}. {reason}'