From 70787439f5c46ced00213232f4afb7d42882999d Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sat, 23 Apr 2022 15:40:21 +0700 Subject: [PATCH] Try catch --- Bot/Admin.fs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Bot/Admin.fs b/Bot/Admin.fs index fe473c2..18b0fa0 100644 --- a/Bot/Admin.fs +++ b/Bot/Admin.fs @@ -103,11 +103,14 @@ let getUserInvitesTable (ctx : IDiscordContext) = task { do! Messaging.defer ctx printfn $"Trying this out" + try let! invites = getUserInvites [ "90588624566886400" ; "822834227467780136" ] printfn $"Total Invites? \n{invites}" let builder = DiscordFollowupMessageBuilder() builder.Content <- $"%A{invites}" do! ctx.FollowUp(builder) + with ex -> + printfn $"exception {ex.Message}" } :> Task type AdminBot() =