From f32d3f6346a43f042799b47ff7bba12ce7e5e022 Mon Sep 17 00:00:00 2001 From: MichaelMcCarthy <47114808+MichaelMcCarthy117@users.noreply.github.com> Date: Tue, 27 Jun 2023 15:14:15 +0100 Subject: [PATCH] Update creating-slash-commands.md (#2684) typo ApplicationCommandException does not contain Error as it contains Errors --- .../slash-commands/creating-slash-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/int_basics/application-commands/slash-commands/creating-slash-commands.md b/docs/guides/int_basics/application-commands/slash-commands/creating-slash-commands.md index a0a7d6fe..466a8657 100644 --- a/docs/guides/int_basics/application-commands/slash-commands/creating-slash-commands.md +++ b/docs/guides/int_basics/application-commands/slash-commands/creating-slash-commands.md @@ -85,7 +85,7 @@ public async Task Client_Ready() catch(ApplicationCommandException exception) { // If our command was invalid, we should catch an ApplicationCommandException. This exception contains the path of the error as well as the error message. You can serialize the Error field in the exception to get a visual of where your error is. - var json = JsonConvert.SerializeObject(exception.Error, Formatting.Indented); + var json = JsonConvert.SerializeObject(exception.Errors, Formatting.Indented); // You can send this error somewhere or just print it to the console, for this example we're just going to print it. Console.WriteLine(json);