Skip to content

Commit

Permalink
a mod can have no categories
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiao921 committed Feb 23, 2021
1 parent 21a001f commit b34f557
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHEF/Components/Commands/Info.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ public async Task ModInfo(
embedBuilder.AddField("DEPRECATED", "This mod is deprecated, it may not work correctly.");
}

embedBuilder.AddField("Categories", string.Join(", ", modInfo.Categories));
if (modInfo.Categories != null)
{
embedBuilder.AddField("Categories", string.Join(", ", modInfo.Categories));
}

embedBuilder.AddField("Rating Score", modInfo.RatingScore, true);
embedBuilder.AddField("Total downloads", modInfo.TotalDownloads(), true);
Expand Down

0 comments on commit b34f557

Please sign in to comment.