From a7529496ce247231480fa12ff04ac32c51438a02 Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 12 Dec 2024 19:33:44 +1300 Subject: [PATCH] winlb now has 9 items per page to look not broken --- src/EllieBot/Modules/Gambling/BetStatsCommands.cs | 4 ++-- src/EllieBot/Modules/Gambling/UserBetStatsService.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EllieBot/Modules/Gambling/BetStatsCommands.cs b/src/EllieBot/Modules/Gambling/BetStatsCommands.cs index 6c18359..60a73a7 100644 --- a/src/EllieBot/Modules/Gambling/BetStatsCommands.cs +++ b/src/EllieBot/Modules/Gambling/BetStatsCommands.cs @@ -152,7 +152,7 @@ public partial class Gambling if (user.StartsWith("??")) user = x.UserId.ToString(); - outputItems.Add(new WinLbStat(i + 1 + (page * 10), user, x.Game, x.MaxWin)); + outputItems.Add(new WinLbStat(i + 1 + (page * 9), user, x.Game, x.MaxWin)); } return outputItems; @@ -169,7 +169,7 @@ public partial class Gambling await Response() .Paginated() .PageItems(p => GetCachedWinLbAsync(p)) - .PageSize(10) + .PageSize(9) .Page((items, curPage) => { var eb = CreateEmbed() diff --git a/src/EllieBot/Modules/Gambling/UserBetStatsService.cs b/src/EllieBot/Modules/Gambling/UserBetStatsService.cs index 6b5e5bb..278b600 100644 --- a/src/EllieBot/Modules/Gambling/UserBetStatsService.cs +++ b/src/EllieBot/Modules/Gambling/UserBetStatsService.cs @@ -60,8 +60,8 @@ public sealed class UserBetStatsService : IEService await using var ctx = _db.GetDbContext(); return await ctx.GetTable() .OrderByDescending(x => x.MaxWin) - .Skip(page * 10) - .Take(10) + .Skip(page * 9) + .Take(9) .ToArrayAsyncLinqToDB(); } } \ No newline at end of file