This works

This commit is contained in:
Joseph Ferano 2022-04-21 13:28:41 +07:00
parent d9d9f993fa
commit 08bdcdd7c6

View File

@ -267,8 +267,8 @@ let spin multiplier (ctx : IDiscordContext) =
embed.Title <- "Slots Results"
let addGBTField (embed : DiscordEmbedBuilder) prize =
if prize > 0<GBT>
then embed.AddField("New 💰$GBT Balance", $"`💰` {player.Bank - playAmount} `💰` {player.Bank - playAmount + prize} `(+{prize - playAmount} $GBT)`") |> ignore
else embed.AddField("New 💰$GBT Balance", $"`💰` {player.Bank} `💰` {player.Bank - prize} `(-{(prize)} $GBT)`") |> ignore
then embed.AddField("New 💰$GBT Balance", $"`💰` {player.Bank} `💰` {player.Bank - playAmount + prize} `(+{prize - playAmount} $GBT)`") |> ignore
else embed.AddField("New 💰$GBT Balance", $"`💰` {player.Bank} `💰` {player.Bank + prize} `({prize} $GBT)`") |> ignore
let! result , prizeAmount = async {
match prize with
| Some (Money amount) ->
@ -277,7 +277,7 @@ let spin multiplier (ctx : IDiscordContext) =
embed.Color <- DiscordColor.Green
embed.Description <- $"You WIN `💰` **{prizeWithMultiplier}** GBT 🎉"
embed.AddField("Bet", $"{playAmount}", true) |> ignore
embed.AddField("Prize", $"{prizeWithMultiplier}") |> ignore
embed.AddField("Prize", $"{prizeWithMultiplier}", true) |> ignore
addGBTField embed prizeWithMultiplier
return "WON" , prizeWithMultiplier
| Some (Jackpot) ->
@ -285,7 +285,7 @@ let spin multiplier (ctx : IDiscordContext) =
embed.Color <- DiscordColor.Green
embed.Description <- $"🎉🎉 YOU HIT THE JACKPOT 🎉🎉"
embed.AddField("Bet", $"{playAmount}", true) |> ignore
embed.AddField("Prize", $"{jackpot}") |> ignore
embed.AddField("Prize", $"{jackpot}", true) |> ignore
addGBTField embed jackpot
do! DbService.updatePlayerCurrency jackpot player |> Async.Ignore
do! resetJackpot BaseJackpotAmount |> Async.Ignore