From 0e43313366a52629de2ad1565aaca87262eec105 Mon Sep 17 00:00:00 2001 From: Mow Date: Sat, 8 Nov 2025 20:23:44 +0100 Subject: [PATCH] =?UTF-8?q?Rajout=20de=20compte=20suspect=20si=20l'utilisa?= =?UTF-8?q?teur=20a=20cr=C3=A9e=20son=20compte=20il=20y=20a=20moin=20de=20?= =?UTF-8?q?7=20jours=20dans=20le=20!inspect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- discordbot/moderation.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/discordbot/moderation.py b/discordbot/moderation.py index 23c2e56..9589359 100644 --- a/discordbot/moderation.py +++ b/discordbot/moderation.py @@ -937,6 +937,17 @@ def create_inspect_embed(user, member, join_date, days_on_server, account_age, w else: embed.add_field(name="🎫 Invitation", value="Inconnue", inline=True) + if member and join_date and user.created_at: + join_dt = join_date if join_date.tzinfo else join_date.replace(tzinfo=timezone.utc) + created_dt = user.created_at if user.created_at.tzinfo else user.created_at.replace(tzinfo=timezone.utc) + days_diff = (join_dt - created_dt).days + if days_diff < 7: + embed.add_field( + name="⚠️ Utilisateur suspect", + value=f"Compte créé {days_diff} jour{'s' if days_diff > 1 else ''} avant de rejoindre le serveur", + inline=False + ) + warning_text = f"⚠️ **{len(warnings)}** avertissement{'s' if len(warnings) > 1 else ''}" kick_text = f"👢 **{len(kicks)}** expulsion{'s' if len(kicks) > 1 else ''}" ban_text = f"🔨 **{len(bans)}** ban{'s' if len(bans) > 1 else ''}"