From 7e65a88bae42706c6cefc1892588c8f8dba4d756 Mon Sep 17 00:00:00 2001 From: Philipp Elvin Friedhoff Date: Tue, 6 Dec 2022 17:17:25 +0100 Subject: [PATCH] Fixed syntax error in example AutocompleteHandler --- .../samples/autocompletion/autocomplete-example.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +}