From 0b0f54f0284583050eb3654f3c3e7824dc842c75 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Mon, 11 Apr 2022 10:56:43 +0700 Subject: [PATCH] Print --- Bot/InviteTracker.fs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Bot/InviteTracker.fs b/Bot/InviteTracker.fs index 5162bef..d4b1de5 100644 --- a/Bot/InviteTracker.fs +++ b/Bot/InviteTracker.fs @@ -538,26 +538,36 @@ let handleCreateInvite (ctx : IDiscordContext) = let! code = task { + printfn "1" let! invites = getInvitesFromUser user.Id + printfn "2" match invites |> Map.toList with | [] -> + printfn "3" let channel = ctx.GetGuild().Channels.[GuildEnvironment.channelWelcome] + printfn "4" let! invite = channel.CreateInviteAsync(max_age = 0, unique = true) + printfn "5" try do! createInvite (ctx.GetDiscordMember().Id) invite.Code |> Async.Ignore with ex -> printfn "%A" ex.Message + printfn "6" return invite.Code | invite::_ -> + printfn "-1" return invite |> fst } + printfn "7" let msg = DiscordFollowupMessageBuilder() .WithContent($"https://discord.gg/{code}") .AsEphemeral(true) + printfn "8" do! ctx.FollowUp(msg) + printfn "9" do! Analytics.recruitLinkButton code user.Id user.Username (ctx.GetChannel()) } :> Task