Browse Source

Tidy up docs

pull/988/head
Hsu Still 7 years ago
parent
commit
08d6558975
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
6 changed files with 65 additions and 20 deletions
  1. +0
    -5
      docs/_overwrites/Commands/CommandContext.Inclusion.md
  2. +14
    -4
      docs/_overwrites/Commands/CommandContext.Overwrite.md
  3. +0
    -10
      docs/_overwrites/Commands/ShardedCommandContext.Overwrite.md
  4. +6
    -1
      docs/_overwrites/Common/Discord.EmbedBuilder.Overwrites.md
  5. +25
    -0
      docs/_overwrites/Common/Discord.EmbedObjectBuilder.Inclusion.md
  6. +20
    -0
      docs/_overwrites/Common/Discord.EmbedObjectBuilder.Overwrites.md

docs/_overwrites/Commands/SocketCommandContext.Overwrite.md → docs/_overwrites/Commands/CommandContext.Inclusion.md View File

@@ -1,8 +1,3 @@
---
uid: Discord.Commands.SocketCommandContext
example: [*content]
---

An example of how this class is used the command system can be seen
below:


+ 14
- 4
docs/_overwrites/Commands/CommandContext.Overwrite.md View File

@@ -3,8 +3,18 @@ uid: Discord.Commands.CommandContext
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)]

+ 0
- 10
docs/_overwrites/Commands/ShardedCommandContext.Overwrite.md View File

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

+ 6
- 1
docs/_overwrites/Common/Discord.EmbedBuilder.Overwrites.md View File

@@ -1,5 +1,9 @@
---
uid: Discord.EmbedBuilder
seealso:
- linkId: Discord.EmbedFooterBuilder
- linkId: Discord.EmbedAuthorBuilder
- linkId: Discord.EmbedFieldBuilder
remarks: *content
---

@@ -12,7 +16,8 @@ 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 using the
command system.

```cs
[Command("embed")]


+ 25
- 0
docs/_overwrites/Common/Discord.EmbedObjectBuilder.Inclusion.md View File

@@ -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();
```

+ 20
- 0
docs/_overwrites/Common/Discord.EmbedObjectBuilder.Overwrites.md View File

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

Loading…
Cancel
Save