module Degenz.Game open System.Threading.Tasks open DSharpPlus.SlashCommands open Degenz.DbService let executePlayerAction (ctx : InteractionContext) (dispatch : PlayerData -> Async) = async { let! playerResult = tryFindPlayer ctx.Member.Id match playerResult with | Some player -> do! dispatch player | None -> do! Messaging.sendSimpleResponse ctx "You are currently not a hacker, first use the /redpill command to become one" } |> Async.StartAsTask :> Task