From d83783b7af596ea666db768ce725905774a460c4 Mon Sep 17 00:00:00 2001 From: Nereziel Date: Sat, 3 Feb 2024 17:46:01 +0100 Subject: [PATCH] Update Commands.cs --- Commands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands.cs b/Commands.cs index 851bf472..b9de982d 100644 --- a/Commands.cs +++ b/Commands.cs @@ -21,7 +21,7 @@ namespace WeaponPaints IpAddress = player?.IpAddress?.Split(":")[0] }; - if (!commandsCooldown.TryGetValue((int)player.UserId, out DateTime cooldownEndTime) || + if (!commandsCooldown.TryGetValue((int)player!.UserId, out DateTime cooldownEndTime) || DateTime.UtcNow >= (commandsCooldown.TryGetValue((int)player.UserId, out cooldownEndTime) ? cooldownEndTime : DateTime.UtcNow)) { commandsCooldown[(int)player.UserId] = DateTime.UtcNow.AddSeconds(Config.CmdRefreshCooldownSeconds);