Answer the question
In order to leave comments, you need to log in
How to call an async method in Main?
How to correctly call an asynchronous method in the main (Main)?
I do like this:
private static void Main(string[] args)
=> new Bot().RunAsync().GetAwaiter().GetResult();
Answer the question
In order to leave comments, you need to log in
Do
private static async Task Main(string[] args)
=> await new Bot.RunAsync();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question