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()`
This commit is contained in:
Almighty-Shogun
2022-03-02 20:07:15 +01:00
committed by GitHub
parent f601e9bc34
commit 7d8911bfed
3 changed files with 7 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ var components = new ComponentBuilder()
.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;
```

View File

@@ -35,11 +35,11 @@ and min/max length of the input:
var tb = new TextInputBuilder()
.WithLabel("Labeled")
.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)

View File

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