Have Chip get the channel
This commit is contained in:
parent
3c242cbb51
commit
202905d9f9
@ -353,7 +353,6 @@ let showWalletStatus (ctx : IDiscordContext) =
|
||||
let sendSubmitEmbed (ctx : IDiscordContext) =
|
||||
async {
|
||||
try
|
||||
let channel = ctx.GetGuild().GetChannel(GuildEnvironment.channelSubmitWallet)
|
||||
let rewardMsg = $"""
|
||||
To confirm your **Whitelist** please submit it below:
|
||||
|
||||
@ -373,18 +372,14 @@ 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
|
||||
let! channel = recruitBot.GetChannelAsync(GuildEnvironment.channelSubmitWallet) |> Async.AwaitTask
|
||||
let! msgs = channel.GetMessagesAsync() |> Async.AwaitTask
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user