@@ -1,8 +1,3 @@ | |||||
--- | |||||
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 | ||||
below: | below: | ||||
@@ -3,8 +3,18 @@ uid: Discord.Commands.CommandContext | |||||
example: [*content] | example: [*content] | ||||
--- | --- | ||||
An example of how this class is used the command system can be seen | |||||
below: | |||||
[!include[Example Section](CommandContext.Inclusion.md)] | |||||
[!code[Sample module](../../guides/commands/samples/empty-module.cs)] | |||||
[!code[Command handler](../../guides/commands/samples/command_handler.cs)] | |||||
--- | |||||
uid: Discord.Commands.SocketCommandContext | |||||
example: [*content] | |||||
--- | |||||
[!include[Example Section](CommandContext.Inclusion.md)] | |||||
--- | |||||
uid: Discord.Commands.ShardCommandContext | |||||
example: [*content] | |||||
--- | |||||
[!include[Example Section](CommandContext.Inclusion.md)] |
@@ -1,10 +0,0 @@ | |||||
--- | |||||
uid: Discord.Commands.ShardedCommandContext | |||||
example: [*content] | |||||
--- | |||||
An example of how this class is used the command system can be seen | |||||
below: | |||||
[!code[Sample module](../../guides/commands/samples/empty-module.cs)] | |||||
[!code[Command handler](../../guides/commands/samples/command_handler.cs)] |
@@ -1,5 +1,9 @@ | |||||
--- | --- | ||||
uid: Discord.EmbedBuilder | uid: Discord.EmbedBuilder | ||||
seealso: | |||||
- linkId: Discord.EmbedFooterBuilder | |||||
- linkId: Discord.EmbedAuthorBuilder | |||||
- linkId: Discord.EmbedFieldBuilder | |||||
remarks: *content | remarks: *content | ||||
--- | --- | ||||
@@ -12,7 +16,8 @@ uid: Discord.EmbedBuilder | |||||
example: [*content] | 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 using the | |||||
command system. | |||||
```cs | ```cs | ||||
[Command("embed")] | [Command("embed")] | ||||
@@ -0,0 +1,25 @@ | |||||
The example will build a rich embed with an author field, a footer | |||||
field, and 2 normal fields using an @Discord.EmbedBuilder: | |||||
```cs | |||||
var exampleAuthor = new EmbedAuthorBuilder() | |||||
.WithName("I am a bot") | |||||
.WithIconUrl("https://discordapp.com/assets/e05ead6e6ebc08df9291738d0aa6986d.png"); | |||||
var exampleFooter = new EmbedFooterBuilder() | |||||
.WithText("I am a nice footer") | |||||
.WithIconUrl("https://discordapp.com/assets/28174a34e77bb5e5310ced9f95cb480b.png"); | |||||
var exampleField = new EmbedFieldBuilder() | |||||
.WithName("Title of Another Field") | |||||
.WithValue("I am an [example](https://example.com).") | |||||
.WithInline(true); | |||||
var otherField = new EmbedFieldBuilder() | |||||
.WithName("Title of a Field") | |||||
.WithValue("Notice how I'm inline with that other field next to me.") | |||||
.WithInline(true); | |||||
var embed = new EmbedBuilder() | |||||
.AddField(exampleField) | |||||
.AddField(otherField) | |||||
.WithAuthor(exampleAuthor) | |||||
.WithFooter(exampleFooter) | |||||
.Build(); | |||||
``` |
@@ -0,0 +1,20 @@ | |||||
--- | |||||
uid: Discord.EmbedAuthorBuilder | |||||
example: [*content] | |||||
--- | |||||
[!include[Embed Object Builder Sample](Discord.EmbedObjectBuilder.Inclusion.md)] | |||||
--- | |||||
uid: Discord.EmbedFooterBuilder | |||||
example: [*content] | |||||
--- | |||||
[!include[Embed Object Builder Sample](Discord.EmbedObjectBuilder.Inclusion.md)] | |||||
--- | |||||
uid: Discord.EmbedFieldBuilder | |||||
example: [*content] | |||||
--- | |||||
[!include[Embed Object Builder Sample](Discord.EmbedObjectBuilder.Inclusion.md)] |