mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
update to show net balance change per request (#48)
update to show net balance change per request
This commit is contained in:
@@ -138,9 +138,12 @@ public class SlotsCommand : ICommand
|
|||||||
decimal rawWinnings = winnings;
|
decimal rawWinnings = winnings;
|
||||||
|
|
||||||
winnings -= wager*spins;
|
winnings -= wager*spins;
|
||||||
|
bool netwin = winnings > 0;
|
||||||
|
string winstr = netwin ? "" : "-";
|
||||||
newBalance = await Money.NewWagerAsync(gambler.Id, wager*spins, winnings, WagerGame.Slots, ct: ctx);
|
newBalance = await Money.NewWagerAsync(gambler.Id, wager*spins, winnings, WagerGame.Slots, ct: ctx);
|
||||||
|
winnings = Math.Abs(winnings);
|
||||||
await botInstance.SendChatMessageAsync(
|
await botInstance.SendChatMessageAsync(
|
||||||
$"{user.FormatUsername()}, you [color={colors[BuiltIn.Keys.KiwiFarmsGreenColor].Value}]won[/color] {await rawWinnings.FormatKasinoCurrencyAsync()} with {spins} spins! Current balance: {await newBalance.FormatKasinoCurrencyAsync()}", true, autoDeleteAfter: TimeSpan.FromSeconds(30));
|
$"{user.FormatUsername()}, you [color={colors[BuiltIn.Keys.KiwiFarmsGreenColor].Value}]won[/color] {await rawWinnings.FormatKasinoCurrencyAsync()} from {spins} spins worth {await wager.FormatKasinoCurrencyAsync()}! Net: {winstr}{winnings.FormatKasinoCurrencyAsync()} Current balance: {await newBalance.FormatKasinoCurrencyAsync()}", true, autoDeleteAfter: TimeSpan.FromSeconds(30));
|
||||||
}
|
}
|
||||||
public class WinDetail
|
public class WinDetail
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user