Browse Source

Add line to show subscribing to CommandService#Log (#756)

tags/2.0.0-beta
Joe4evr Christopher F 7 years ago
parent
commit
0bdc2455bc
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      docs/guides/getting_started/samples/intro/structure.cs

+ 3
- 3
docs/guides/getting_started/samples/intro/structure.cs View File

@@ -39,6 +39,9 @@ class Program
// add the `using` at the top, and uncomment this line:
//WebSocketProvider = WS4NetProvider.Instance
});
// Subscribe the logging handler to both the client and the CommandService.
_client.Log += Logger;
_commands.Log += Logger;
}

// Example of a logging handler. This can be re-used by addons
@@ -77,9 +80,6 @@ class Program

private async Task MainAsync()
{
// Subscribe the logging handler.
_client.Log += Logger;

// Centralize the logic for commands into a seperate method.
await InitCommands();



Loading…
Cancel
Save