From 79026e0c27f600bd867b2519b398b37854f9958c Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 9 Dec 2024 17:31:23 +0000 Subject: [PATCH] fix: .winlb looks better when there are no items --- src/NadekoBot/Modules/Gambling/BetStatsCommands.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Gambling/BetStatsCommands.cs b/src/NadekoBot/Modules/Gambling/BetStatsCommands.cs index 36494e621..bface2364 100644 --- a/src/NadekoBot/Modules/Gambling/BetStatsCommands.cs +++ b/src/NadekoBot/Modules/Gambling/BetStatsCommands.cs @@ -172,11 +172,17 @@ public partial class Gambling var eb = CreateEmbed() .WithOkColor(); + if (items.Count == 0) + { + eb.WithDescription(GetText(strs.empty_page)); + return eb; + } + for (var i = 0; i < items.Count; i++) { var item = items[i]; eb.AddField($"#{item.Rank} {item.User}", - $"[{item.Game}]{N(item.MaxWin)}"); + $"{N(item.MaxWin)}\n`{item.Game.ToString().ToLower()}`"); } return eb;