From 5aba49697eaba7eca8d8cbec297c74f06a195faa Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Wed, 8 Oct 2025 20:54:55 -0500 Subject: [PATCH] Fixed displaying green color for crash and added wait for msg ID --- KfChatDotNetBot/Commands/KasinoGambaCommands.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/KfChatDotNetBot/Commands/KasinoGambaCommands.cs b/KfChatDotNetBot/Commands/KasinoGambaCommands.cs index f4144a3..5bc966d 100644 --- a/KfChatDotNetBot/Commands/KasinoGambaCommands.cs +++ b/KfChatDotNetBot/Commands/KasinoGambaCommands.cs @@ -304,6 +304,14 @@ public class Planes : ICommand var noseUp = true; var planesDisplay = GetGameBoard(counter, planesBoard, plane, carrierCount, noseUp); var msgId = await botInstance.SendChatMessageAsync(planesDisplay, true); + var num = 0; + while (msgId.ChatMessageId == null) + { + num++; + if (msgId.Status is SentMessageTrackerStatus.NotSending or SentMessageTrackerStatus.Lost) return; + if (num > 60) return; + await Task.Delay(100, ctx); + } //place where planes used to stop working /* * new goal of basic planes game @@ -408,7 +416,7 @@ public class Planes : ICommand } plane.Crash(); await Money.NewWagerAsync(gambler.Id, wager, -wager, WagerGame.Planes, ct: ctx); - await botInstance.SendChatMessageAsync($"{user.FormatUsername()}, you [color={colors[BuiltIn.Keys.KiwiFarmsGreenColor].Value}]crashed![/color] Your balance is now: {await newBalance.FormatKasinoCurrencyAsync()}", true); + await botInstance.SendChatMessageAsync($"{user.FormatUsername()}, you [color={colors[BuiltIn.Keys.KiwiFarmsRedColor].Value}]crashed![/color] Your balance is now: {await newBalance.FormatKasinoCurrencyAsync()}", true); } private string GetGameBoard(int counter, int[,] planesBoard, Plane plane, int carrierCount, bool noseUp)