| @@ -1,7 +1,7 @@ | |||||
| public class Program | public class Program | ||||
| { | { | ||||
| public static void Main(string[] args) | |||||
| => new Program().MainAsync().GetAwaiter().GetResult(); | |||||
| public static async Task Main(string[] args) | |||||
| => await new Program().MainAsync(); | |||||
| public async Task MainAsync() | public async Task MainAsync() | ||||
| { | { | ||||
| @@ -2,8 +2,8 @@ public class Program | |||||
| { | { | ||||
| private DiscordSocketClient _client; | private DiscordSocketClient _client; | ||||
| public static void Main(string[] args) | |||||
| => new Program().MainAsync().GetAwaiter().GetResult(); | |||||
| public static async Task Main(string[] args) | |||||
| => await new Program().MainAsync(); | |||||
| public async Task MainAsync() | public async Task MainAsync() | ||||
| { | { | ||||
| @@ -10,11 +10,11 @@ using Discord.WebSocket; | |||||
| class Program | class Program | ||||
| { | { | ||||
| // Program entry point | // Program entry point | ||||
| static void Main(string[] args) | |||||
| static async Task Main(string[] args) | |||||
| { | { | ||||
| // Call the Program constructor, followed by the | // Call the Program constructor, followed by the | ||||
| // MainAsync method and wait until it finishes (which should be never). | // MainAsync method and wait until it finishes (which should be never). | ||||
| new Program().MainAsync().GetAwaiter().GetResult(); | |||||
| await new Program().MainAsync(); | |||||
| } | } | ||||
| private readonly DiscordSocketClient _client; | private readonly DiscordSocketClient _client; | ||||