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