This commit is contained in:
Joseph Ferano 2022-05-19 00:11:00 +07:00
parent d2d18114ef
commit 3c242cbb51

View File

@ -373,18 +373,23 @@ To confirm your **Whitelist** please submit it below:
let btn = DiscordButtonComponent(ButtonStyle.Success, "WalletStatus", "Check Status") :> DiscordComponent
builder.AddComponents [| btn |] |> ignore
printfn "1"
let! msgs = channel.GetMessagesAsync() |> Async.AwaitTask
printfn "2"
let recruitBot = GuildEnvironment.botClientRecruit.Value
match msgs |> Seq.tryHead with
| Some msg ->
if msg.Author.Id = recruitBot.CurrentUser.Id then
printfn "3"
do! msg.ModifyAsync(builder) |> Async.AwaitTask |> Async.Ignore
printfn "4"
| None ->
printfn "2a"
do! recruitBot.SendMessageAsync(channel, builder)
|> Async.AwaitTask
|> Async.Ignore
with e ->
printfn $"Error trying to get channel Whitelist\n\n{e.Message}"
printfn $"Error trying to get channel Recruit thing\n\n{e.Message}"
} |> Async.RunSynchronously
let handleCreateInvite (ctx : IDiscordContext) =