aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-10-15 11:37:12 +0200
committerGravatar GitHub <[email protected]>2021-10-15 11:37:12 +0200
commita791dac927ada417ee090f00a25c1ea2b5d53ada (patch)
tree57d5c63f3b295584f964305f3843db322abf9ae9
parentMerge branch 'main' into discord-2.0 (diff)
Defcon: remove tzinfo from member.created_at
-rw-r--r--bot/exts/moderation/defcon.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/moderation/defcon.py b/bot/exts/moderation/defcon.py
index 173e81ff6..189f8eb31 100644
--- a/bot/exts/moderation/defcon.py
+++ b/bot/exts/moderation/defcon.py
@@ -111,7 +111,7 @@ class Defcon(Cog):
if self.threshold:
now = datetime.utcnow()
- if now - member.created_at < relativedelta_to_timedelta(self.threshold):
+ if now - member.created_at.replace(tzinfo=None) < relativedelta_to_timedelta(self.threshold):
log.info(f"Rejecting user {member}: Account is too new")
message_sent = False