mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 12:32:03 -04:00
Fixed reference to Jackpot and corrected JsonProperty to JsonElement
This commit is contained in:
@@ -117,7 +117,7 @@ public class Clashgg : IDisposable
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var packet = JsonSerializer.Deserialize<Tuple<string, JsonProperty>>(message.Text);
|
var packet = JsonSerializer.Deserialize<Tuple<string, JsonElement>>(message.Text);
|
||||||
if (packet == null) throw new InvalidOperationException("Caught a null when deserializing Clash.gg packet");
|
if (packet == null) throw new InvalidOperationException("Caught a null when deserializing Clash.gg packet");
|
||||||
if (packet.Item1 == "online")
|
if (packet.Item1 == "online")
|
||||||
{
|
{
|
||||||
@@ -131,7 +131,7 @@ public class Clashgg : IDisposable
|
|||||||
if (packet.Item1 == "plinko:social-game")
|
if (packet.Item1 == "plinko:social-game")
|
||||||
{
|
{
|
||||||
_logger.Debug("Received Plinko game from Clash.gg. Deserializing payload");
|
_logger.Debug("Received Plinko game from Clash.gg. Deserializing payload");
|
||||||
var betPacket = packet.Item2.Value.Deserialize<ClashggWsPlinkoModel>();
|
var betPacket = packet.Item2.Deserialize<ClashggWsPlinkoModel>();
|
||||||
if (betPacket == null)
|
if (betPacket == null)
|
||||||
{
|
{
|
||||||
throw new Exception("Caught a null when deserializing a Clash.gg Plinko packet");
|
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")
|
if (packet.Item1 == "mines:game")
|
||||||
{
|
{
|
||||||
_logger.Debug("Received Mines game from Clash.gg. Deserializing payload");
|
_logger.Debug("Received Mines game from Clash.gg. Deserializing payload");
|
||||||
var betPacket = packet.Item2.Value.Deserialize<ClashggWsMinesModel>();
|
var betPacket = packet.Item2.Deserialize<ClashggWsMinesModel>();
|
||||||
if (betPacket == null)
|
if (betPacket == null)
|
||||||
{
|
{
|
||||||
throw new Exception("Caught a null when deserializing a Clash.gg Mines packet");
|
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")
|
if (packet.Item1 == "keno:game")
|
||||||
{
|
{
|
||||||
_logger.Debug("Received Keno game from Clash.gg. Deserializing payload");
|
_logger.Debug("Received Keno game from Clash.gg. Deserializing payload");
|
||||||
var betPacket = packet.Item2.Value.Deserialize<ClashggWsKenoModel>();
|
var betPacket = packet.Item2.Deserialize<ClashggWsKenoModel>();
|
||||||
if (betPacket == null)
|
if (betPacket == null)
|
||||||
{
|
{
|
||||||
throw new Exception("Caught a null when deserializing a Clash.gg Keno packet");
|
throw new Exception("Caught a null when deserializing a Clash.gg Keno packet");
|
||||||
@@ -198,7 +198,7 @@ public class Clashgg : IDisposable
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
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(e);
|
||||||
_logger.Error("--- Payload ---");
|
_logger.Error("--- Payload ---");
|
||||||
_logger.Error(message.Text);
|
_logger.Error(message.Text);
|
||||||
|
|||||||
Reference in New Issue
Block a user