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:
@@ -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;
|
||||
```
|
||||
|
||||
|
||||
@@ -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.");
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -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>>
|
||||
|
||||
Reference in New Issue
Block a user