Upgrade Gatherer Client and fix bug where card legalities could be an empty collection and throwing and exception as a result

This commit is contained in:
Runebaas 2019-03-02 00:32:59 -05:00
parent aa059b5558
commit ff15e21b5a
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
2 changed files with 2 additions and 2 deletions

View file

@ -57,7 +57,7 @@ namespace Geekbot.net.Commands.Integrations
if (!string.IsNullOrEmpty(card.ManaCost)) eb.AddInlineField("Cost", _manaConverter.ConvertMana(card.ManaCost));
if (!string.IsNullOrEmpty(card.Rarity)) eb.AddInlineField("Rarity", card.Rarity);
if (card.Legalities != null)
if (card.Legalities != null && card.Legalities.Count > 0)
eb.AddField("Legality", string.Join(", ", card.Legalities.Select(e => e.Format)));
await ReplyAsync("", false, eb.Build());

View file

@ -40,7 +40,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.1.0" />
<PackageReference Include="MtgApiManager.Lib" Version="1.1.1" />
<PackageReference Include="MtgApiManager.Lib" Version="1.2.0" />
<PackageReference Include="MyAnimeListSharp" Version="1.3.4" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="NLog" Version="4.5.6" />