Update creating-slash-commands.md (#2684)

typo ApplicationCommandException does not contain Error as it contains Errors
This commit is contained in:
MichaelMcCarthy
2023-06-27 15:14:15 +01:00
committed by GitHub
parent 547bc92537
commit f32d3f6346

View File

@@ -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);