diff --git a/docs/guides/int_framework/samples/autocompletion/autocomplete-example.cs b/docs/guides/int_framework/samples/autocompletion/autocomplete-example.cs index 30c0697e1..a2511f3ca 100644 --- a/docs/guides/int_framework/samples/autocompletion/autocomplete-example.cs +++ b/docs/guides/int_framework/samples/autocompletion/autocomplete-example.cs @@ -1,6 +1,6 @@ // you need to add `Autocomplete` attribute before parameter to add autocompletion to it [SlashCommand("command_name", "command_description")] -public async Task ExampleCommand([Summary("parameter_name"), Autocomplete(typeof(ExampleAutocompleteHandler))] string parameterWithAutocompletion) +public async Task ExampleCommand([Summary("parameter_name"), [Autocomplete(typeof(ExampleAutocompleteHandler))] string parameterWithAutocompletion) => await RespondAsync($"Your choice: {parameterWithAutocompletion}"); public class ExampleAutocompleteHandler : AutocompleteHandler @@ -17,4 +17,4 @@ public class ExampleAutocompleteHandler : AutocompleteHandler // max - 25 suggestions at a time (API limit) return AutocompletionResult.FromSuccess(results.Take(25)); } -} \ No newline at end of file +}