From a61778cd0d068bb24542fc534ad8422d99b86295 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sat, 22 Mar 2025 14:06:10 +0800 Subject: [PATCH] Fixed reference to Jackpot and corrected JsonProperty to JsonElement --- KfChatDotNetBot/Services/Clashgg.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/KfChatDotNetBot/Services/Clashgg.cs b/KfChatDotNetBot/Services/Clashgg.cs index 9a8906f..1bea81f 100644 --- a/KfChatDotNetBot/Services/Clashgg.cs +++ b/KfChatDotNetBot/Services/Clashgg.cs @@ -117,7 +117,7 @@ public class Clashgg : IDisposable try { - var packet = JsonSerializer.Deserialize>(message.Text); + var packet = JsonSerializer.Deserialize>(message.Text); if (packet == null) throw new InvalidOperationException("Caught a null when deserializing Clash.gg packet"); if (packet.Item1 == "online") { @@ -131,7 +131,7 @@ public class Clashgg : IDisposable if (packet.Item1 == "plinko:social-game") { _logger.Debug("Received Plinko game from Clash.gg. Deserializing payload"); - var betPacket = packet.Item2.Value.Deserialize(); + var betPacket = packet.Item2.Deserialize(); if (betPacket == null) { throw new Exception("Caught a null when deserializing a Clash.gg Plinko packet"); @@ -153,7 +153,7 @@ public class Clashgg : IDisposable if (packet.Item1 == "mines:game") { _logger.Debug("Received Mines game from Clash.gg. Deserializing payload"); - var betPacket = packet.Item2.Value.Deserialize(); + var betPacket = packet.Item2.Deserialize(); if (betPacket == null) { throw new Exception("Caught a null when deserializing a Clash.gg Mines packet"); @@ -176,7 +176,7 @@ public class Clashgg : IDisposable if (packet.Item1 == "keno:game") { _logger.Debug("Received Keno game from Clash.gg. Deserializing payload"); - var betPacket = packet.Item2.Value.Deserialize(); + var betPacket = packet.Item2.Deserialize(); if (betPacket == null) { throw new Exception("Caught a null when deserializing a Clash.gg Keno packet"); @@ -198,7 +198,7 @@ public class Clashgg : IDisposable } catch (Exception e) { - _logger.Error("Failed to handle message from Jackpot"); + _logger.Error("Failed to handle message from Clash.gg"); _logger.Error(e); _logger.Error("--- Payload ---"); _logger.Error(message.Text);