From f156c00dfb0b7213e310afe1f64a8fada7b67689 Mon Sep 17 00:00:00 2001 From: 2riniar Date: Wed, 1 Jan 2025 18:31:08 +0900 Subject: [PATCH] =?UTF-8?q?Slot:=20=E5=88=A9=E7=9B=8A=E9=A1=8D=E3=81=8C0?= =?UTF-8?q?=E3=81=AE=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=82=92=E3=83=A9?= =?UTF-8?q?=E3=83=B3=E3=82=AD=E3=83=B3=E3=82=B0=E3=81=8B=E3=82=89=E9=99=A4?= =?UTF-8?q?=E5=A4=96=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Events/Slot/SlotRankingPresenter.cs | 1 + Events/Slot/SlotUtility.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Events/Slot/SlotRankingPresenter.cs b/Events/Slot/SlotRankingPresenter.cs index fc8db16..ba06728 100644 --- a/Events/Slot/SlotRankingPresenter.cs +++ b/Events/Slot/SlotRankingPresenter.cs @@ -15,6 +15,7 @@ protected override async Task MainAsync() var selfUser = await app.FindOrCreateUserAsync(Message.Author.Id); var users = await app.Users + .Where(x => x.MonthlySlotProfitPrice != 0) .OrderByDescending(user => user.MonthlySlotProfitPrice) .Take(MasterManager.SettingMaster.PurchaseInfoRankingViewUserCount) .ToListAsync(); diff --git a/Events/Slot/SlotUtility.cs b/Events/Slot/SlotUtility.cs index 33c40c9..608896e 100644 --- a/Events/Slot/SlotUtility.cs +++ b/Events/Slot/SlotUtility.cs @@ -8,6 +8,11 @@ public static class SlotUtility { public static string CreateRankingView(IReadOnlyList rankingUsers) { + if (rankingUsers.Count == 0) + { + return "ランキングはまだありません"; + } + var embedBuilder = new StringBuilder(); var order = 1; foreach (var user in rankingUsers)