From 8a194f7b0e6679f47e9ed985c3d9657cd3b96849 Mon Sep 17 00:00:00 2001 From: Mow910 Date: Thu, 6 Nov 2025 20:03:05 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20v=C3=A9rification=20de=20d?= =?UTF-8?q?=C3=A9lai=20pour=20les=20actions=20de=20kick=20dans=20le=20mess?= =?UTF-8?q?age=20de=20d=C3=A9part=20des=20membres,=20avec=20un=20check=20d?= =?UTF-8?q?e=203s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- discordbot/welcome.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discordbot/welcome.py b/discordbot/welcome.py index d8eec7d..5667724 100644 --- a/discordbot/welcome.py +++ b/discordbot/welcome.py @@ -115,6 +115,10 @@ async def sendLeaveMessage(bot: discord.Client, member: Member): if not (entry.target and entry.target.id == member.id): continue + time_diff = (now - entry.created_at).total_seconds() + if time_diff > 3: + continue + if entry.action == discord.AuditLogAction.kick: reason = f'Expulsé par {entry.user.mention}' if entry.reason: