From 463f2e574d1901436b5f0e6729fbbb1f65ede8b0 Mon Sep 17 00:00:00 2001 From: RogueException Date: Sat, 10 Oct 2015 23:17:25 -0300 Subject: [PATCH] Fixed logging samples --- docs/features/commands.rst | 4 ++-- docs/features/logging.rst | 2 +- docs/samples/getting_started.cs | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/features/commands.rst b/docs/features/commands.rst index 2708d3f26..31da73c65 100644 --- a/docs/features/commands.rst +++ b/docs/features/commands.rst @@ -8,13 +8,13 @@ The `Discord.Net.Commands`_ package DiscordBotClient extends DiscordClient with Example (Simple) ---------------- -.. literalinclude:: ../samples/command.cs +.. literalinclude:: /samples/command.cs :language: csharp6 :tab-width: 2 Example (Groups) ---------------- -.. literalinclude:: ../samples/command_group.cs +.. literalinclude:: /samples/command_group.cs :language: csharp6 :tab-width: 2 \ No newline at end of file diff --git a/docs/features/logging.rst b/docs/features/logging.rst index ea1ade4d0..b16c9bfd1 100644 --- a/docs/features/logging.rst +++ b/docs/features/logging.rst @@ -6,6 +6,6 @@ Example ------- -.. literalinclude:: samples/logging.cs +.. literalinclude:: /samples/logging.cs :language: csharp6 :tab-width: 2 \ No newline at end of file diff --git a/docs/samples/getting_started.cs b/docs/samples/getting_started.cs index 8448b5c4c..402db4a30 100644 --- a/docs/samples/getting_started.cs +++ b/docs/samples/getting_started.cs @@ -5,6 +5,9 @@ class Program { var client = new DiscordClient(); + //Log some info to console + client.LogMessage += (s, e) => Console.WriteLine($"[{e.Severity}] {e.Source}: {e.Message}"); + //Echo any message received, provided it didn't come from us client.MessageCreated += async (s, e) => {