public DiscordHttpException(DiscordHttpError error) : base($"{(int)error.Code} {error.Message}") { Code = error.Code; ErrorMessage = error.Message; if (error.Fields != null) { InvalidFields = FindErrors(error.Fields); } }
internal DiscordHttpException(DiscordHttpError error) : base($"{(int)error.Code} {error.Message}") { Code = error.Code; ErrorMessage = error.Message; InvalidParameters = new Dictionary <string, IReadOnlyList <InvalidParameter> >(); if (error.Fields != null) { foreach (var field in error.Fields) { InvalidParameters[field.Key] = field.Value.Fields; } } }