diff --git a/docs/guides/getting_started/samples/first-bot/client.cs b/docs/guides/getting_started/samples/first-bot/client.cs index 6ff75b8a3..a2fcef256 100644 --- a/docs/guides/getting_started/samples/first-bot/client.cs +++ b/docs/guides/getting_started/samples/first-bot/client.cs @@ -6,8 +6,12 @@ public async Task MainAsync() _client.Log += Log; - // Remember to keep token private or to read it - // from an external source! + // Remember to keep token private or to read it from an + // external source! In this case, we are reading the token + // from an environment variable. If you do not know how to set-up + // environment variables, you may find more information on the + // Internet or by using other methods such as reading from + // a configuration. await _client.LoginAsync(TokenType.Bot, Environment.GetEnvironmentVariable("DiscordToken")); await _client.StartAsync(); diff --git a/docs/guides/getting_started/samples/first-bot/complete.cs b/docs/guides/getting_started/samples/first-bot/complete.cs index 8c3903d41..1b4a67ef3 100644 --- a/docs/guides/getting_started/samples/first-bot/complete.cs +++ b/docs/guides/getting_started/samples/first-bot/complete.cs @@ -8,15 +8,11 @@ public class Program public async Task MainAsync() { _client = new DiscordSocketClient(); - _client.Log += Log; _client.MessageReceived += MessageReceivedAsync; - - // Remember to keep this private or to read this - // from an external source! await _client.LoginAsync(TokenType.Bot, Environment.GetEnvironmentVariable("DiscordToken")); await _client.StartAsync(); - + // Block this task until the program is closed. await Task.Delay(-1); }