static string Unknown(FailedResult result) { Logger.Verbose(LogSource.Service, $"A command returned an unknown error. Please screenshot this message and show it to my developers: {result.GetType().AsPrettyString()}"); return("Unknown error."); }
private async ValueTask InternalHandleFailedResultAsync(DiscordCommandContext context, FailedResult result) { try { await HandleFailedResultAsync(context, result).ConfigureAwait(false); } catch (Exception ex) { Logger.LogError(ex, "An exception occurred while handling the failed result of type {0}.", result.GetType().Name); } if (result is CommandNotFoundResult && _masterService != null) { await _masterService.HandleCommandNotFound(context).ConfigureAwait(false); } await DisposeContextAsync(context).ConfigureAwait(false); }