Browse Source

Vastly simplified xref redirection

pull/988/head
Hsu Still 7 years ago
parent
commit
291ad1cf5e
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
7 changed files with 31 additions and 31 deletions
  1. +7
    -7
      docs/faq/Commands.md
  2. +3
    -3
      docs/faq/basic-operations.md
  3. +4
    -4
      docs/faq/client-basics.md
  4. +12
    -12
      docs/guides/commands/commands.md
  5. +2
    -2
      docs/guides/concepts/logging.md
  6. +2
    -2
      docs/guides/getting_started/intro.md
  7. +1
    -1
      docs/guides/voice/sending-voice.md

+ 7
- 7
docs/faq/Commands.md View File

@@ -24,8 +24,8 @@ You may be confusing [CommandService#AddModulesAsync] with
[CommandService#AddModuleAsync]. The former is used to add modules
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?

@@ -104,7 +104,7 @@ the [DefaultRunMode] flag under `CommandServiceConfig`.

[RunMode]: xref:Discord.Commands.RunMode
[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?

@@ -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
[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
[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

+ 3
- 3
docs/faq/basic-operations.md View File

@@ -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
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?

@@ -71,7 +71,7 @@ implement [IEmote] and are valid options.

[!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?



+ 4
- 4
docs/faq/client-basics.md View File

@@ -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]
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?

@@ -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
available in the cache.

[MessageCacheSize]: xref:Discord.WebSocket.DiscordSocketConfig#Discord_WebSocket_DiscordSocketConfig_MessageCacheSize
[MessageCacheSize]: xref:Discord.WebSocket.DiscordSocketConfig.MessageCacheSize
[DiscordSocketConfig]: xref:Discord.WebSocket.DiscordSocketConfig
[MessageUpdated]: xref:Discord.WebSocket.BaseSocketClient#Discord_WebSocket_BaseSocketClient_MessageUpdated
[MessageUpdated]: xref:Discord.WebSocket.BaseSocketClient.MessageUpdated

+ 12
- 12
docs/guides/commands/commands.md View File

@@ -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
[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

@@ -153,7 +153,7 @@ Invoke [CommandService.AddModulesAsync] to discover modules and
install them.

[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

@@ -161,7 +161,7 @@ To manually load a module, invoke [CommandService.AddModuleAsync] by
passing in the generic type of your module and optionally, a
service provider.

[CommandService.AddModuleAsync]: xref:Discord.Commands.CommandService#Discord_Commands_CommandService_AddModuleAsync__1_System_IServiceProvider_
[CommandService.AddModuleAsync]: xref:Discord.Commands.CommandService.AddModuleAsync*

### Module Constructors

@@ -228,8 +228,8 @@ Any publicly settable properties will also be filled in the same
manner.

>[!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]
>If you accept `CommandService` or `IServiceProvider` as a parameter
@@ -283,9 +283,9 @@ necessary.

[!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

@@ -329,9 +329,9 @@ If you are able to successfully parse the input, return
necessary.

[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

@@ -344,4 +344,4 @@ and must be explicitly added.

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*

+ 2
- 2
docs/guides/concepts/logging.md View File

@@ -3,12 +3,12 @@ title: Logging
---

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]
section.

[Log]: xref:Discord.Rest.BaseDiscordClient#Discord_Rest_BaseDiscordClient_Log
[Log]: xref:Discord.Rest.BaseDiscordClient.Log
[Events]: events.md

### Usage


+ 2
- 2
docs/guides/getting_started/intro.md View File

@@ -105,7 +105,7 @@ the Console.

[!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

@@ -212,7 +212,7 @@ shown below.

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
[SocketMessageChannel]: xref:Discord.WebSocket.ISocketMessageChannel
[completed program]: samples/intro/complete.cs


+ 1
- 1
docs/guides/voice/sending-voice.md View File

@@ -44,7 +44,7 @@ guild. To switch channels within a guild, invoke [ConnectAsync] on
another voice channel in the guild.

[IAudioClient]: xref:Discord.Audio.IAudioClient
[ConnectAsync]: xref:Discord.IAudioChannel#Discord_IAudioChannel_ConnectAsync_System_Action_IAudioClient__
[ConnectAsync]: xref:Discord.IAudioChannel.ConnectAsync*

## Transmitting Audio



Loading…
Cancel
Save