Update creating-slash-commands.md (#2684)
typo ApplicationCommandException does not contain Error as it contains Errors
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user