| @@ -1,5 +1,6 @@ | |||||
| --- | --- | ||||
| uid: Discord.Commands.CommandContext | uid: Discord.Commands.CommandContext | ||||
| example: [*content] | |||||
| --- | --- | ||||
| An example of how this class is used the command system can be seen | An example of how this class is used the command system can be seen | ||||
| @@ -1,9 +1,8 @@ | |||||
| --- | --- | ||||
| uid: Discord.Commands.CommandException | uid: Discord.Commands.CommandException | ||||
| remarks: *content | |||||
| --- | --- | ||||
| ### Remarks | |||||
| This @System.Exception class is typically used when diagnosing | This @System.Exception class is typically used when diagnosing | ||||
| an error thrown during the execution of a command. You will find the | an error thrown during the execution of a command. You will find the | ||||
| thrown exception passed into | thrown exception passed into | ||||
| @@ -11,6 +10,11 @@ thrown exception passed into | |||||
| sent to your [CommandService.Log](xref:Discord.Commands.CommandService.Log) | sent to your [CommandService.Log](xref:Discord.Commands.CommandService.Log) | ||||
| event handler. | event handler. | ||||
| --- | |||||
| uid: Discord.Commands.CommandException | |||||
| example: [*content] | |||||
| --- | |||||
| You may use this information to handle runtime exceptions after | You may use this information to handle runtime exceptions after | ||||
| execution. Below is an example of how you may use this: | execution. Below is an example of how you may use this: | ||||
| @@ -1,15 +1,17 @@ | |||||
| --- | --- | ||||
| uid: Discord.Commands.DontAutoLoadAttribute | uid: Discord.Commands.DontAutoLoadAttribute | ||||
| remarks: *content | |||||
| --- | --- | ||||
| ### Remarks | |||||
| The attribute can be applied to a public class that inherits | The attribute can be applied to a public class that inherits | ||||
| @Discord.Commands.ModuleBase. By applying this attribute, | @Discord.Commands.ModuleBase. By applying this attribute, | ||||
| @Discord.Commands.CommandService.AddModulesAsync* will not discover and | @Discord.Commands.CommandService.AddModulesAsync* will not discover and | ||||
| add the marked module to the CommandService. | add the marked module to the CommandService. | ||||
| ### Example | |||||
| --- | |||||
| uid: Discord.Commands.DontAutoLoadAttribute | |||||
| example: [*content] | |||||
| --- | |||||
| ```cs | ```cs | ||||
| [DontAutoLoad] | [DontAutoLoad] | ||||
| @@ -1,16 +1,18 @@ | |||||
| --- | --- | ||||
| uid: Discord.Commands.DontInjectAttribute | uid: Discord.Commands.DontInjectAttribute | ||||
| remarks: *content | |||||
| --- | --- | ||||
| ### Remarks | |||||
| The attribute can be applied to a public settable property inside a | The attribute can be applied to a public settable property inside a | ||||
| @Discord.Commands.ModuleBase based class. By applying this property, | |||||
| @Discord.Commands.ModuleBase based class. By applying this attribute, | |||||
| the marked property will not be automatically injected of the | the marked property will not be automatically injected of the | ||||
| dependency. See [Dependency Injection](../../guides/commands/commands.md#dependency-injection) | dependency. See [Dependency Injection](../../guides/commands/commands.md#dependency-injection) | ||||
| to learn more. | to learn more. | ||||
| ### Example | |||||
| --- | |||||
| uid: Discord.Commands.DontInjectAttribute | |||||
| example: [*content] | |||||
| --- | |||||
| ```cs | ```cs | ||||
| public class MyModule : ModuleBase<SocketCommandContext> | public class MyModule : ModuleBase<SocketCommandContext> | ||||
| @@ -1,8 +1,8 @@ | |||||
| --- | --- | ||||
| uid: Discord.Commands.ShardedCommandContext | uid: Discord.Commands.ShardedCommandContext | ||||
| example: [*content] | |||||
| --- | --- | ||||
| ### Example | |||||
| An example of how this class is used the command system can be seen | An example of how this class is used the command system can be seen | ||||
| below: | below: | ||||
| @@ -1,5 +1,6 @@ | |||||
| --- | --- | ||||
| uid: Discord.Commands.SocketCommandContext | uid: Discord.Commands.SocketCommandContext | ||||
| example: [*content] | |||||
| --- | --- | ||||
| An example of how this class is used the command system can be seen | An example of how this class is used the command system can be seen | ||||
| @@ -1,14 +1,16 @@ | |||||
| --- | --- | ||||
| uid: Discord.EmbedBuilder | uid: Discord.EmbedBuilder | ||||
| remarks: *content | |||||
| --- | --- | ||||
| ### Remarks | |||||
| This builder class is used to build an @Discord.Embed (rich embed) | This builder class is used to build an @Discord.Embed (rich embed) | ||||
| object that will be ready to be sent via @Discord.IMessageChannel.SendMessageAsync* | |||||
| object that will be ready to be sent via @Discord.IMessageChannel.SendMessageAsync* | |||||
| after @Discord.EmbedBuilder.Build* is called. | after @Discord.EmbedBuilder.Build* is called. | ||||
| ### Example | |||||
| --- | |||||
| uid: Discord.EmbedBuilder | |||||
| example: [*content] | |||||
| --- | |||||
| The example below builds an embed and sends it to the chat. | The example below builds an embed and sends it to the chat. | ||||