fix(bot): 🚑 Bans not setting the time correctly.

This commit is contained in:
Nyeki.py
2024-10-18 14:01:48 -03:00
parent 4c06b6367e
commit fb753cf1a5
+8 -1
View File
@@ -177,7 +177,14 @@ class Payphone(commands.AutoShardedBot):
if duration is not None:
last_ban = (
await models.Ban.filter(user_id=user_id)
await models.Ban.filter(
expressions.Q(
expires_at=None,
expires_at__gt=datetime.now(timezone.utc),
join_type="OR",
),
user_id=user_id,
)
.order_by("-created_at")
.limit(1)
.first()