diff --git a/Bot/Games/Store.fs b/Bot/Games/Store.fs index 40ad67e..68e703a 100644 --- a/Bot/Games/Store.fs +++ b/Bot/Games/Store.fs @@ -247,6 +247,7 @@ let handleBuyItem (dispatch : IDiscordContext -> Task) (ctx : IDiscordContext) i >>= checkDoesntExceedStackCap item |> handleResultWithResponse ctx (fun player -> async { let price = match item.Attributes with CanBuy price -> price | _ -> 0 + try do! dispatch ctx |> Async.AwaitTask do! DbService.updatePlayerCurrency -price player.DiscordId |> Async.Ignore do! DbService.addToPlayerInventory player.DiscordId item |> Async.Ignore @@ -273,6 +274,8 @@ let handleBuyItem (dispatch : IDiscordContext -> Task) (ctx : IDiscordContext) i |> Async.Ignore do! Analytics.buyItemButton (ctx.GetDiscordMember()) item.Id price + with ex -> + printfn $"STORE ERROR: {ex.Message}" }) })