From 71e534a3965fd5d886ceb337896c72945f844b2d Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Wed, 10 Dec 2025 20:15:38 -0600 Subject: [PATCH] Fix screwed up regex for selecting the number, display formatting issues with numbers and changed the game result to print on a single line --- .../Commands/Kasino/LimboCommand.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/KfChatDotNetBot/Commands/Kasino/LimboCommand.cs b/KfChatDotNetBot/Commands/Kasino/LimboCommand.cs index f502bb1..6c0119b 100644 --- a/KfChatDotNetBot/Commands/Kasino/LimboCommand.cs +++ b/KfChatDotNetBot/Commands/Kasino/LimboCommand.cs @@ -15,10 +15,10 @@ namespace KfChatDotNetBot.Commands.Kasino; public class LimboCommand : ICommand { public List Patterns => [ - new Regex(@"^limbo (?\d+)$ (?\d+\.\d+)$", RegexOptions.IgnoreCase), - new Regex(@"^limbo (?\d+\.\d+)$ (?\d+\.\d+)$", RegexOptions.IgnoreCase), - new Regex(@"^limbo (?\d+\.\d+)$ (?\d+)$", RegexOptions.IgnoreCase), - new Regex(@"^limbo (?\d+)$ (?\d+)$", RegexOptions.IgnoreCase), + new Regex(@"^limbo (?\d+) (?\d+\.\d+)$", RegexOptions.IgnoreCase), + new Regex(@"^limbo (?\d+\.\d+) (?\d+\.\d+)$", RegexOptions.IgnoreCase), + new Regex(@"^limbo (?\d+\.\d+) (?\d+)$", RegexOptions.IgnoreCase), + new Regex(@"^limbo (?\d+) (?\d+)$", RegexOptions.IgnoreCase), new Regex(@"^limbo (?\d+)$", RegexOptions.IgnoreCase), new Regex(@"^limbo (?\d+\.\d+)$", RegexOptions.IgnoreCase), new Regex("^limbo") @@ -82,9 +82,10 @@ public class LimboCommand : ICommand //you win colorToUse = settings[BuiltIn.Keys.KiwiFarmsGreenColor].Value!; newBalance = await Money.NewWagerAsync(gambler.Id, wager, wager * limboNumber, WagerGame.Limbo, ct: ctx); - await botInstance.SendChatMessageAsync( - $"[b][color={colorToUse}] {casinoNumbers[1]}", true, autoDeleteAfter: cleanupDelay); - await botInstance.SendChatMessageAsync($"{user.FormatUsername()}, you [color={settings[BuiltIn.Keys.KiwiFarmsGreenColor].Value}] won {wager * limboNumber}![/color] Your balance is now: {newBalance}.", true, autoDeleteAfter: cleanupDelay); + var win = await (wager * limboNumber).FormatKasinoCurrencyAsync(); + await botInstance.SendChatMessageAsync($"[b][color={colorToUse}] {casinoNumbers[1]:N2}[/color][/b][br]{user.FormatUsername()}, you " + + $"[color={settings[BuiltIn.Keys.KiwiFarmsGreenColor].Value}] won {win}![/color] " + + $"Your balance is now: {await newBalance.FormatKasinoCurrencyAsync()}!", true, autoDeleteAfter: cleanupDelay); } else @@ -95,9 +96,9 @@ public class LimboCommand : ICommand else colorToUse = "orange"; //use orange for mid range guess //you lose newBalance = await Money.NewWagerAsync(gambler.Id, wager, -wager, WagerGame.Limbo, ct: ctx); - await botInstance.SendChatMessageAsync($"[b][color={colorToUse}] {casinoNumbers}", true, autoDeleteAfter: cleanupDelay); await botInstance.SendChatMessageAsync( - $"{user.FormatUsername()}, you [color={settings[BuiltIn.Keys.KiwiFarmsRedColor].Value}]lost {await wager.FormatKasinoCurrencyAsync()}[/color]. Your balance is now: {newBalance}.", + $"[b][color={colorToUse}] {casinoNumbers[1]:N2}[/color][/b][br]{user.FormatUsername()}, you [color={settings[BuiltIn.Keys.KiwiFarmsRedColor].Value}]" + + $"lost {await wager.FormatKasinoCurrencyAsync()}[/color]. Your balance is now: {await newBalance.FormatKasinoCurrencyAsync()}.", true, autoDeleteAfter: cleanupDelay); }