aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Vivaan Verma <[email protected]>2021-04-19 20:01:41 +0100
committerGravatar GitHub <[email protected]>2021-04-19 20:01:41 +0100
commitb8b920bfa5c4d918d41bfe06d85b1e85f4bec0da (patch)
tree1617dc85da0bf6c4099d93680b5b2fe803662c08
parentFix linting errors (diff)
Inline duration assignment
Co-authored-by: Rohan Reddy Alleti <[email protected]>
-rw-r--r--bot/exts/moderation/infraction/superstarify.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/moderation/infraction/superstarify.py b/bot/exts/moderation/infraction/superstarify.py
index 6fa0d550f..3d880dec3 100644
--- a/bot/exts/moderation/infraction/superstarify.py
+++ b/bot/exts/moderation/infraction/superstarify.py
@@ -136,8 +136,7 @@ class Superstarify(InfractionScheduler, Cog):
return
# Set the duration to 1 hour if none was provided
- if not duration:
- duration = datetime.datetime.now() + datetime.timedelta(hours=1)
+ duration = duration or datetime.datetime.utcnow() + datetime.timedelta(hours=1)
# Post the infraction to the API
old_nick = member.display_name