Browse Source

Add indentation to example for clarity

pull/1161/head
Still Hsu 7 years ago
parent
commit
16b1901d22
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
2 changed files with 4 additions and 2 deletions
  1. +2
    -1
      docs/guides/getting_started/samples/first-bot/client.cs
  2. +2
    -1
      docs/guides/getting_started/samples/first-bot/complete.cs

+ 2
- 1
docs/guides/getting_started/samples/first-bot/client.cs View File

@@ -12,7 +12,8 @@ public async Task MainAsync()
// 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.LoginAsync(TokenType.Bot,
Environment.GetEnvironmentVariable("DiscordToken"));
await _client.StartAsync();

// Block this task until the program is closed.


+ 2
- 1
docs/guides/getting_started/samples/first-bot/complete.cs View File

@@ -10,7 +10,8 @@ public class Program
_client = new DiscordSocketClient();
_client.Log += Log;
_client.MessageReceived += MessageReceivedAsync;
await _client.LoginAsync(TokenType.Bot, Environment.GetEnvironmentVariable("DiscordToken"));
await _client.LoginAsync(TokenType.Bot,
Environment.GetEnvironmentVariable("DiscordToken"));
await _client.StartAsync();
// Block this task until the program is closed.


Loading…
Cancel
Save