Browse Source

Fixed documentation typo's (#2127)

* Fixed typo at line 39

On this code example for the documentation there was a typo on the README.md file at line 39. There was an `;` where there should not be one.

The code that had the typo:

```cs
var tb = new TextInputBuilder()
    .WithLabel("Labeled")
    .WithCustomId("text_input")
    .WithStyle(TextInputStyle.Paragraph)
    .WithMinLength(6); // This ";" does not belong here.
    .WithMaxLength(42)
    .WithRequired(true)
    .WithPlaceholder("Consider this place held.");
```

* Changed `ExecuteAsync` to `ExecuteCommandAsync`

`_interactionService.ExecuteAsync(ctx, serviceProvider);` cannot be executed because the method `ExecuteAsync` does not exists.

* Changed `componBuild()` to `components.Build()`
tags/3.4.0
Almighty-Shogun GitHub 3 years ago
parent
commit
7d8911bfed
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions
  1. +1
    -1
      docs/guides/int_basics/message-components/advanced.md
  2. +5
    -5
      docs/guides/int_basics/message-components/text-input.md
  3. +1
    -1
      docs/guides/int_framework/samples/intro/context.cs

+ 1
- 1
docs/guides/int_basics/message-components/advanced.md View File

@@ -43,7 +43,7 @@ var components = new ComponentBuilder()
.WithSelectMenu(menu); .WithSelectMenu(menu);




await arg.RespondAsync("On a scale of one to five, how gaming is this?", component: componBuild(), ephemeral: true);
await arg.RespondAsync("On a scale of one to five, how gaming is this?", component: components.Build(), ephemeral: true);
break; break;
``` ```




+ 5
- 5
docs/guides/int_basics/message-components/text-input.md View File

@@ -35,11 +35,11 @@ and min/max length of the input:
var tb = new TextInputBuilder() var tb = new TextInputBuilder()
.WithLabel("Labeled") .WithLabel("Labeled")
.WithCustomId("text_input") .WithCustomId("text_input")
.WithStyle(TextInputStyle.Paragraph)
.WithMinLength(6);
.WithMaxLength(42)
.WithRequired(true)
.WithPlaceholder("Consider this place held.");
.WithStyle(TextInputStyle.Paragraph)
.WithMinLength(6)
.WithMaxLength(42)
.WithRequired(true)
.WithPlaceholder("Consider this place held.");
``` ```


![more advanced text input](images/image9.png) ![more advanced text input](images/image9.png)


+ 1
- 1
docs/guides/int_framework/samples/intro/context.cs View File

@@ -1,7 +1,7 @@
discordClient.ButtonExecuted += async (interaction) => discordClient.ButtonExecuted += async (interaction) =>
{ {
var ctx = new SocketInteractionContext<SocketMessageComponent>(discordClient, interaction); var ctx = new SocketInteractionContext<SocketMessageComponent>(discordClient, interaction);
await _interactionService.ExecuteAsync(ctx, serviceProvider);
await _interactionService.ExecuteCommandAsync(ctx, serviceProvider);
}; };


public class MessageComponentModule : InteractionModuleBase<SocketInteractionContext<SocketMessageComponent>> public class MessageComponentModule : InteractionModuleBase<SocketInteractionContext<SocketMessageComponent>>


Loading…
Cancel
Save