Check store error
This commit is contained in:
parent
23a3c23643
commit
d88c6be0ce
@ -247,6 +247,7 @@ let handleBuyItem (dispatch : IDiscordContext -> Task) (ctx : IDiscordContext) i
|
|||||||
>>= checkDoesntExceedStackCap item
|
>>= checkDoesntExceedStackCap item
|
||||||
|> handleResultWithResponse ctx (fun player -> async {
|
|> handleResultWithResponse ctx (fun player -> async {
|
||||||
let price = match item.Attributes with CanBuy price -> price | _ -> 0<GBT>
|
let price = match item.Attributes with CanBuy price -> price | _ -> 0<GBT>
|
||||||
|
try
|
||||||
do! dispatch ctx |> Async.AwaitTask
|
do! dispatch ctx |> Async.AwaitTask
|
||||||
do! DbService.updatePlayerCurrency -price player.DiscordId |> Async.Ignore
|
do! DbService.updatePlayerCurrency -price player.DiscordId |> Async.Ignore
|
||||||
do! DbService.addToPlayerInventory player.DiscordId item |> Async.Ignore
|
do! DbService.addToPlayerInventory player.DiscordId item |> Async.Ignore
|
||||||
@ -273,6 +274,8 @@ let handleBuyItem (dispatch : IDiscordContext -> Task) (ctx : IDiscordContext) i
|
|||||||
|> Async.Ignore
|
|> Async.Ignore
|
||||||
|
|
||||||
do! Analytics.buyItemButton (ctx.GetDiscordMember()) item.Id price
|
do! Analytics.buyItemButton (ctx.GetDiscordMember()) item.Id price
|
||||||
|
with ex ->
|
||||||
|
printfn $"STORE ERROR: {ex.Message}"
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user