Try catch around initial message
This commit is contained in:
parent
eb4e42ad11
commit
31864ed025
@ -28,6 +28,7 @@ let TrainerEvents = [|
|
||||
|
||||
let sendInitialEmbed (client : DiscordClient) =
|
||||
async {
|
||||
try
|
||||
let! channel = client.GetChannelAsync(GuildEnvironment.channelTraining) |> Async.AwaitTask
|
||||
let builder = DiscordMessageBuilder()
|
||||
let embed = DiscordEmbedBuilder()
|
||||
@ -41,6 +42,8 @@ let sendInitialEmbed (client : DiscordClient) =
|
||||
do! channel.SendMessageAsync(builder)
|
||||
|> Async.AwaitTask
|
||||
|> Async.Ignore
|
||||
with e ->
|
||||
printfn $"Error trying to get channel {GuildEnvironment.channelTraining}\n\n{e.Message}"
|
||||
} |> Async.RunSynchronously
|
||||
|
||||
let handleTrainerStep1 (ctx : IDiscordContext) =
|
||||
|
Loading…
x
Reference in New Issue
Block a user