diff --git a/docs/guides/samples/logging.cs b/docs/guides/samples/logging.cs index 24ab76e9b..05d8e9496 100644 --- a/docs/guides/samples/logging.cs +++ b/docs/guides/samples/logging.cs @@ -3,13 +3,12 @@ using Discord.Rest; public class Program { - // Note: This is the REST client, it only supports REST calls. - private DiscordClient _client; + private DiscordSocketClient _client; static void Main(string[] args) => new Program().Start().GetAwaiter().GetResult(); public async Task Start() { - _client = new DiscordRestClient(new DiscordConfig() { + _client = new DiscordSocketClient(new DiscordSocketConfig() { LogLevel = LogSeverity.Info }); @@ -19,6 +18,9 @@ public class Program return Task.CompletedTask; }; - await _client.LoginAsync(TokenType.Bot, "bot token"); + await _client.LoginAsync(TokenType.Bot, "bot token"); + await _client.ConnectAsync(); + + await Task.Delay(-1); } -} \ No newline at end of file +}