.winlb looks better when there are no items

This commit is contained in:
Toastie 2024-12-10 22:23:12 +13:00
parent d743bd563b
commit 688c1572f8
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4

View file

@ -172,11 +172,17 @@ public partial class Gambling
var eb = CreateEmbed() var eb = CreateEmbed()
.WithOkColor(); .WithOkColor();
if (items.Count == 0)
{
eb.WithDescription(GetText(strs.empty_page));
return eb;
}
for (var i = 0; i < items.Count; i++) for (var i = 0; i < items.Count; i++)
{ {
var item = items[i]; var item = items[i];
eb.AddField($"#{item.Rank} {item.User}", eb.AddField($"#{item.Rank} {item.User}",
$"[{item.Game}]{N(item.MaxWin)}"); $"{N(item.MaxWin)}\n`{item.Game.ToString().ToLower()}`");
} }
return eb; return eb;