From 166fa3e5cb1891e18c18afda715af75f505bbafe Mon Sep 17 00:00:00 2001 From: OMEGA3065 Date: Tue, 9 Jun 2026 16:59:10 +0200 Subject: [PATCH] fix: player left would be logged even if player is null --- DiscordLab.ConnectionLogs/Events.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DiscordLab.ConnectionLogs/Events.cs b/DiscordLab.ConnectionLogs/Events.cs index a56d997..da4ba00 100644 --- a/DiscordLab.ConnectionLogs/Events.cs +++ b/DiscordLab.ConnectionLogs/Events.cs @@ -45,6 +45,9 @@ public override void OnPlayerLeft(PlayerLeftEventArgs ev) if (Config.LeaveChannelId == 0) return; + if (ev.Player?.IsReady != true) + return; + if (!Client.TryGetOrAddChannel(Config.LeaveChannelId, out SocketTextChannel channel)) { Logger.Error(