From 7d8911bfed9b8488055bb4c6b928bf01913d7100 Mon Sep 17 00:00:00 2001 From: Almighty-Shogun <96011415+Almighty-Shogun@users.noreply.github.com> Date: Wed, 2 Mar 2022 20:07:15 +0100 Subject: [PATCH] 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()` --- docs/guides/int_basics/message-components/advanced.md | 2 +- .../guides/int_basics/message-components/text-input.md | 10 +++++----- docs/guides/int_framework/samples/intro/context.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/guides/int_basics/message-components/advanced.md b/docs/guides/int_basics/message-components/advanced.md index 49b3f31a6..14dc94e40 100644 --- a/docs/guides/int_basics/message-components/advanced.md +++ b/docs/guides/int_basics/message-components/advanced.md @@ -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; ``` diff --git a/docs/guides/int_basics/message-components/text-input.md b/docs/guides/int_basics/message-components/text-input.md index 37f5b4937..92679ae41 100644 --- a/docs/guides/int_basics/message-components/text-input.md +++ b/docs/guides/int_basics/message-components/text-input.md @@ -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) diff --git a/docs/guides/int_framework/samples/intro/context.cs b/docs/guides/int_framework/samples/intro/context.cs index 5976ffc5c..1bd164d3f 100644 --- a/docs/guides/int_framework/samples/intro/context.cs +++ b/docs/guides/int_framework/samples/intro/context.cs @@ -1,7 +1,7 @@ discordClient.ButtonExecuted += async (interaction) => { var ctx = new SocketInteractionContext(discordClient, interaction); - await _interactionService.ExecuteAsync(ctx, serviceProvider); + await _interactionService.ExecuteCommandAsync(ctx, serviceProvider); }; public class MessageComponentModule : InteractionModuleBase>