| @@ -14,12 +14,14 @@ section. | |||||
| ### Usage | ### Usage | ||||
| To receive log events, simply hook the discord client's log method | To receive log events, simply hook the discord client's log method | ||||
| to a Task with a single parameter of type [LogMessage] | |||||
| to a `Task` with a single parameter of type [LogMessage]. | |||||
| It is recommended that you use an established function instead of a | It is recommended that you use an established function instead of a | ||||
| lambda for handling logs, because most [addons] accept a reference | |||||
| lambda for handling logs, because most addons accept a reference | |||||
| to a logging function to write their own messages. | to a logging function to write their own messages. | ||||
| [LogMessage]: xref:Discord.LogMessage | |||||
| ### Usage in Commands | ### Usage in Commands | ||||
| Discord.Net's [CommandService] also provides a log event, identical | Discord.Net's [CommandService] also provides a log event, identical | ||||
| @@ -29,6 +31,9 @@ Data logged through this event is typically coupled with a | |||||
| [CommandException], where information about the command's context | [CommandException], where information about the command's context | ||||
| and error can be found and handled. | and error can be found and handled. | ||||
| [CommandService]: Discord.Commands.CommandService | |||||
| [CommandException]: Discord.Commands.CommandException | |||||
| #### Samples | #### Samples | ||||
| [!code-csharp[Logging Sample](samples/logging.cs)] | [!code-csharp[Logging Sample](samples/logging.cs)] | ||||