change psn search results formatting

This commit is contained in:
13xforever 2020-03-10 18:38:08 +05:00
parent 929da22997
commit a6069d617c

View File

@ -171,16 +171,14 @@ namespace CompatBot.Commands
var (url, color) = await ThumbnailProvider.GetThumbnailUrlWithColorAsync(ctx.Client, g.Id, PsnBlue, g.Attributes.ThumbnailUrlBase).ConfigureAwait(false);
string score;
if ((g.Attributes.StarRating?.Score ?? 0m) == 0m || (g.Attributes.StarRating?.Total ?? 0) == 0)
score = "N/A";
if (ctx.User.Id == 247291873511604224ul)
score = StringUtils.GetStars(g.Attributes.StarRating?.Score ?? 0);
else
score = StringUtils.GetMoons(g.Attributes.StarRating?.Score ?? 0);
if ((g.Attributes.StarRating?.Score ?? 0m) == 0m || (g.Attributes.StarRating?.Total ?? 0) == 0)
score = $"{score} (N/A)";
else
{
if (ctx.User.Id == 247291873511604224ul)
score = StringUtils.GetStars(g.Attributes.StarRating?.Score);
else
score = StringUtils.GetMoons(g.Attributes.StarRating?.Score);
score = $"{score} ({g.Attributes.StarRating?.Score} by {g.Attributes.StarRating.Total} people)";
}
string fileSize = null;
if (g.Attributes.FileSize?.Value.HasValue ?? false)
{