PUSH
This commit is contained in:
parent
a4b0834047
commit
faa45a49f7
@ -302,7 +302,7 @@ let updatePlayerCurrency (addAmount : int<GBT>) (did : uint64) =
|
||||
"did", Sql.string (string did)
|
||||
"gbt", Sql.int (int addAmount)
|
||||
] |> Sql.query """
|
||||
UPDATE "user" SET gbt = gbt + GREATEST(gbt + @gbt, 0) WHERE discord_id = @did;
|
||||
UPDATE "user" SET gbt = GREATEST(gbt + @gbt, 0) WHERE discord_id = @did;
|
||||
"""
|
||||
|> Sql.executeNonQueryAsync
|
||||
|> Async.AwaitTask
|
||||
|
@ -270,11 +270,11 @@ 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}", true) |> ignore
|
||||
addGBTField embed (Inventory.getBuyPrice jackpot.Item)
|
||||
do! DbService.updatePlayerCurrency (Inventory.getBuyPrice jackpot.Item) player.DiscordId |> Async.Ignore
|
||||
embed.AddField("Prize", $"{jackpot.Stock}", true) |> ignore
|
||||
addGBTField embed (jackpot.Stock * 1<GBT>)
|
||||
do! DbService.updatePlayerCurrency (jackpot.Stock * 1<GBT>) player.DiscordId |> Async.Ignore
|
||||
do! DbService.setItemStock BaseJackpotAmount "JACKPOT" |> Async.Ignore
|
||||
return "JACKPOT" , Inventory.getBuyPrice jackpot.Item
|
||||
return "JACKPOT" , jackpot.Stock * 1<GBT>
|
||||
| None ->
|
||||
do! DbService.incrementItemStock 1<GBT> "JACKPOT" |> Async.Ignore
|
||||
embed.Description <- $"You LOST `💰` **{playAmount}** $GBT 😭"
|
||||
|
Loading…
x
Reference in New Issue
Block a user