@@ -24,8 +24,8 @@ You may be confusing [CommandService#AddModulesAsync] with | |||||
[CommandService#AddModuleAsync]. The former is used to add modules | [CommandService#AddModuleAsync]. The former is used to add modules | ||||
via the assembly, while the latter is used to add a single module. | via the assembly, while the latter is used to add a single module. | ||||
[CommandService#AddModulesAsync]: xref:Discord.Commands.CommandService#Discord_Commands_CommandService_AddModulesAsync_Assembly_System_IServiceProvider_ | |||||
[CommandService#AddModuleAsync]: xref:Discord.Commands.CommandService#Discord_Commands_CommandService_AddModuleAsync__1_System_IServiceProvider_ | |||||
[CommandService#AddModulesAsync]: xref:Discord.Commands.CommandService.AddModulesAsync* | |||||
[CommandService#AddModuleAsync]: xref:Discord.Commands.CommandService.AddModuleAsync* | |||||
## What does [Remainder] do in the command signature? | ## What does [Remainder] do in the command signature? | ||||
@@ -104,7 +104,7 @@ the [DefaultRunMode] flag under `CommandServiceConfig`. | |||||
[RunMode]: xref:Discord.Commands.RunMode | [RunMode]: xref:Discord.Commands.RunMode | ||||
[CommandAttribute]: xref:Discord.Commands.CommandAttribute | [CommandAttribute]: xref:Discord.Commands.CommandAttribute | ||||
[DefaultRunMode]: xref:Discord.Commands.CommandServiceConfig#Discord_Commands_CommandServiceConfig_DefaultRunMode | |||||
[DefaultRunMode]: xref:Discord.Commands.CommandServiceConfig.DefaultRunMode | |||||
## How does `RunMode.Async` work, and why is Discord.NET *not* using it by default? | ## How does `RunMode.Async` work, and why is Discord.NET *not* using it by default? | ||||
@@ -134,10 +134,10 @@ For #4, exceptions are caught in [CommandService#Log] event under | |||||
[Task.Run]: https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.run | [Task.Run]: https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.run | ||||
[async state machine]: https://www.red-gate.com/simple-talk/dotnet/net-tools/c-async-what-is-it-and-how-does-it-work/ | [async state machine]: https://www.red-gate.com/simple-talk/dotnet/net-tools/c-async-what-is-it-and-how-does-it-work/ | ||||
[ExecuteAsync]: xref:Discord.Commands.CommandService#Discord_Commands_CommandService_ExecuteAsync_Discord_Commands_ICommandContext_System_Int32_System_IServiceProvider_Discord_Commands_MultiMatchHandling_ | |||||
[ExecuteAsync]: xref:Discord.Commands.CommandService.ExecuteAsync* | |||||
[ExecuteResult]: xref:Discord.Commands.ExecuteResult | [ExecuteResult]: xref:Discord.Commands.ExecuteResult | ||||
[RuntimeResult]: xref:Discord.Commands.RuntimeResult | [RuntimeResult]: xref:Discord.Commands.RuntimeResult | ||||
[CommandExecuted]: xref:Discord.Commands.CommandService#Discord_Commands_CommandService_CommandExecuted | |||||
[CommandService#Log]: xref:Discord.Commands.CommandService#Discord_Commands_CommandService_Log | |||||
[LogMessage.Exception]: xref:Discord.LogMessage#Discord_LogMessage_Exception | |||||
[CommandExecuted]: xref:Discord.Commands.CommandService.CommandExecuted | |||||
[CommandService#Log]: xref:Discord.Commands.CommandService.Log | |||||
[LogMessage.Exception]: xref:Discord.LogMessage.Exception* | |||||
[CommandException]: xref:Discord.Commands.CommandException | [CommandException]: xref:Discord.Commands.CommandException |
@@ -36,8 +36,8 @@ means casting is your friend. You should attempt to cast the channel | |||||
as an [IMessageChannel] or any other entity that implements it to be | as an [IMessageChannel] or any other entity that implements it to be | ||||
able to message. | able to message. | ||||
[SendMessageAsync]: xref:Discord.IMessageChannel#Discord_IMessageChannel_SendMessageAsync_System_String_System_Boolean_Discord_Embed_Discord_RequestOptions_ | |||||
[GetChannel]: xref:Discord.WebSocket.DiscordSocketClient#Discord_WebSocket_DiscordSocketClient_GetChannel_System_UInt64_ | |||||
[SendMessageAsync]: xref:Discord.IMessageChannel.SendMessageAsync* | |||||
[GetChannel]: xref:Discord.WebSocket.DiscordSocketClient.GetChannel* | |||||
## How can I tell if a message is from X, Y, Z channel? | ## How can I tell if a message is from X, Y, Z channel? | ||||
@@ -71,7 +71,7 @@ implement [IEmote] and are valid options. | |||||
[!code-csharp[Emoji](samples/basics/emoji.cs)] | [!code-csharp[Emoji](samples/basics/emoji.cs)] | ||||
[AddReactionAsync]: xref:Discord.IUserMessage#Discord_IUserMessage_AddReactionAsync_Discord_IEmote_Discord_RequestOptions_ | |||||
[AddReactionAsync]: xref:Discord.IUserMessage.AddReactionAsync* | |||||
## Why am I getting so many preemptive rate limits when I try to add more than one reactions? | ## Why am I getting so many preemptive rate limits when I try to add more than one reactions? | ||||
@@ -34,8 +34,8 @@ particular guild has downloaded; however, it's best to wait for all | |||||
guilds to be downloaded. Once all downloads are complete, the [Ready] | guilds to be downloaded. Once all downloads are complete, the [Ready] | ||||
event is triggered, then you can proceed to do whatever you like. | event is triggered, then you can proceed to do whatever you like. | ||||
[Ready]: xref:Discord.WebSocket.DiscordSocketClient#Discord_WebSocket_DiscordSocketClient_Ready | |||||
[GuildAvailable]: xref:Discord.WebSocket.BaseSocketClient#Discord_WebSocket_BaseSocketClient_GuildAvailable | |||||
[Ready]: xref:Discord.WebSocket.DiscordSocketClient.Ready | |||||
[GuildAvailable]: xref:Discord.WebSocket.BaseSocketClient.GuildAvailable | |||||
## How do I get a message's previous content when that message is edited? | ## How do I get a message's previous content when that message is edited? | ||||
@@ -49,6 +49,6 @@ use the cached message entity. Read more about it [here](../guides/concepts/even | |||||
3. Only messages received *after* the bot comes online will be | 3. Only messages received *after* the bot comes online will be | ||||
available in the cache. | available in the cache. | ||||
[MessageCacheSize]: xref:Discord.WebSocket.DiscordSocketConfig#Discord_WebSocket_DiscordSocketConfig_MessageCacheSize | |||||
[MessageCacheSize]: xref:Discord.WebSocket.DiscordSocketConfig.MessageCacheSize | |||||
[DiscordSocketConfig]: xref:Discord.WebSocket.DiscordSocketConfig | [DiscordSocketConfig]: xref:Discord.WebSocket.DiscordSocketConfig | ||||
[MessageUpdated]: xref:Discord.WebSocket.BaseSocketClient#Discord_WebSocket_BaseSocketClient_MessageUpdated | |||||
[MessageUpdated]: xref:Discord.WebSocket.BaseSocketClient.MessageUpdated |
@@ -134,7 +134,7 @@ accessing the channel through the [Context] and sending a message. | |||||
[Context]: xref:Discord.Commands.ModuleBase`1#Discord_Commands_ModuleBase_1_Context | [Context]: xref:Discord.Commands.ModuleBase`1#Discord_Commands_ModuleBase_1_Context | ||||
[SocketCommandContext]: xref:Discord.Commands.SocketCommandContext | [SocketCommandContext]: xref:Discord.Commands.SocketCommandContext | ||||
[ReplyAsync]: xref:Discord.Commands.ModuleBase`1#Discord_Commands_ModuleBase_1_ReplyAsync_System_String_System_Boolean_Discord_Embed_Discord_RequestOptions_ | |||||
[ReplyAsync]: xref:Discord.Commands.ModuleBase`1.ReplyAsync* | |||||
### Example Module | ### Example Module | ||||
@@ -153,7 +153,7 @@ Invoke [CommandService.AddModulesAsync] to discover modules and | |||||
install them. | install them. | ||||
[DontAutoLoadAttribute]: xref:Discord.Commands.DontAutoLoadAttribute | [DontAutoLoadAttribute]: xref:Discord.Commands.DontAutoLoadAttribute | ||||
[CommandService.AddModulesAsync]: xref:Discord.Commands.CommandService#Discord_Commands_CommandService_AddModulesAsync_Assembly_System_IServiceProvider_ | |||||
[CommandService.AddModulesAsync]: xref:Discord.Commands.CommandService.AddModulesAsync* | |||||
#### Loading Modules Manually | #### Loading Modules Manually | ||||
@@ -161,7 +161,7 @@ To manually load a module, invoke [CommandService.AddModuleAsync] by | |||||
passing in the generic type of your module and optionally, a | passing in the generic type of your module and optionally, a | ||||
service provider. | service provider. | ||||
[CommandService.AddModuleAsync]: xref:Discord.Commands.CommandService#Discord_Commands_CommandService_AddModuleAsync__1_System_IServiceProvider_ | |||||
[CommandService.AddModuleAsync]: xref:Discord.Commands.CommandService.AddModuleAsync* | |||||
### Module Constructors | ### Module Constructors | ||||
@@ -228,8 +228,8 @@ Any publicly settable properties will also be filled in the same | |||||
manner. | manner. | ||||
>[!NOTE] | >[!NOTE] | ||||
> Annotating a property with a [DontInjectAttribute] attribute will prevent the | |||||
property from being injected. | |||||
> Annotating a property with a [DontInjectAttribute] attribute will | |||||
> prevent the property from being injected. | |||||
>[!NOTE] | >[!NOTE] | ||||
>If you accept `CommandService` or `IServiceProvider` as a parameter | >If you accept `CommandService` or `IServiceProvider` as a parameter | ||||
@@ -283,9 +283,9 @@ necessary. | |||||
[!code-csharp[Custom Precondition](samples/require_owner.cs)] | [!code-csharp[Custom Precondition](samples/require_owner.cs)] | ||||
[CheckPermissionsAsync]: xref:Discord.Commands.PreconditionAttribute#Discord_Commands_PreconditionAttribute_CheckPermissionsAsync_Discord_Commands_ICommandContext_Discord_Commands_CommandInfo_System_IServiceProvider_ | |||||
[PreconditionResult.FromSuccess]: xref:Discord.Commands.PreconditionResult#Discord_Commands_PreconditionResult_FromSuccess | |||||
[PreconditionResult.FromError]: xref:Discord.Commands.PreconditionResult#Discord_Commands_PreconditionResult_FromError_System_String_ | |||||
[CheckPermissionsAsync]: xref:Discord.Commands.PreconditionAttribute.CheckPermissionsAsync* | |||||
[PreconditionResult.FromSuccess]: xref:Discord.Commands.PreconditionResult.FromSuccess* | |||||
[PreconditionResult.FromError]: xref:Discord.Commands.PreconditionResult.FromError* | |||||
# Type Readers | # Type Readers | ||||
@@ -329,9 +329,9 @@ If you are able to successfully parse the input, return | |||||
necessary. | necessary. | ||||
[TypeReaderResult]: xref:Discord.Commands.TypeReaderResult | [TypeReaderResult]: xref:Discord.Commands.TypeReaderResult | ||||
[TypeReaderResult.FromSuccess]: xref:Discord.Commands.TypeReaderResult#Discord_Commands_TypeReaderResult_FromSuccess_Discord_Commands_TypeReaderValue_ | |||||
[TypeReaderResult.FromError]: xref:Discord.Commands.TypeReaderResult#Discord_Commands_TypeReaderResult_FromError_Discord_Commands_CommandError_System_String_ | |||||
[ReadAsync]: xref:Discord.Commands.TypeReader#Discord_Commands_TypeReader_ReadAsync_Discord_Commands_ICommandContext_System_String_System_IServiceProvider_ | |||||
[TypeReaderResult.FromSuccess]: xref:Discord.Commands.TypeReaderResult.FromSuccess* | |||||
[TypeReaderResult.FromError]: xref:Discord.Commands.TypeReaderResult.FromError* | |||||
[ReadAsync]: xref:Discord.Commands.TypeReader.ReadAsync* | |||||
#### Sample | #### Sample | ||||
@@ -344,4 +344,4 @@ and must be explicitly added. | |||||
To install a TypeReader, invoke [CommandService.AddTypeReader]. | To install a TypeReader, invoke [CommandService.AddTypeReader]. | ||||
[CommandService.AddTypeReader]: xref:Discord.Commands.CommandService#Discord_Commands_CommandService_AddTypeReader__1_Discord_Commands_TypeReader_ | |||||
[CommandService.AddTypeReader]: xref:Discord.Commands.CommandService.AddTypeReader* |
@@ -3,12 +3,12 @@ title: Logging | |||||
--- | --- | ||||
Discord.Net's clients provide a [Log] event that all messages will be | Discord.Net's clients provide a [Log] event that all messages will be | ||||
disbatched over. | |||||
dispatched over. | |||||
For more information about events in Discord.Net, see the [Events] | For more information about events in Discord.Net, see the [Events] | ||||
section. | section. | ||||
[Log]: xref:Discord.Rest.BaseDiscordClient#Discord_Rest_BaseDiscordClient_Log | |||||
[Log]: xref:Discord.Rest.BaseDiscordClient.Log | |||||
[Events]: events.md | [Events]: events.md | ||||
### Usage | ### Usage | ||||
@@ -105,7 +105,7 @@ the Console. | |||||
[!code-csharp[Async Context](samples/intro/logging.cs)] | [!code-csharp[Async Context](samples/intro/logging.cs)] | ||||
[API Documentation]: xref:Discord.Rest.BaseDiscordClient#Discord_Rest_BaseDiscordClient_Log | |||||
[API Documentation]: xref:Discord.Rest.BaseDiscordClient.Log | |||||
### Creating a Discord Client | ### Creating a Discord Client | ||||
@@ -212,7 +212,7 @@ shown below. | |||||
For your reference, you may view the [completed program]. | For your reference, you may view the [completed program]. | ||||
[MessageReceived]: xref:Discord.WebSocket.BaseSocketClient#Discord_WebSocket_BaseSocketClient_MessageReceived | |||||
[MessageReceived]: xref:Discord.WebSocket.BaseSocketClient.MessageReceived | |||||
[SocketMessage]: xref:Discord.WebSocket.SocketMessage | [SocketMessage]: xref:Discord.WebSocket.SocketMessage | ||||
[SocketMessageChannel]: xref:Discord.WebSocket.ISocketMessageChannel | [SocketMessageChannel]: xref:Discord.WebSocket.ISocketMessageChannel | ||||
[completed program]: samples/intro/complete.cs | [completed program]: samples/intro/complete.cs | ||||
@@ -44,7 +44,7 @@ guild. To switch channels within a guild, invoke [ConnectAsync] on | |||||
another voice channel in the guild. | another voice channel in the guild. | ||||
[IAudioClient]: xref:Discord.Audio.IAudioClient | [IAudioClient]: xref:Discord.Audio.IAudioClient | ||||
[ConnectAsync]: xref:Discord.IAudioChannel#Discord_IAudioChannel_ConnectAsync_System_Action_IAudioClient__ | |||||
[ConnectAsync]: xref:Discord.IAudioChannel.ConnectAsync* | |||||
## Transmitting Audio | ## Transmitting Audio | ||||