From 5209ba802a6857b97de370b1a834cef5d9f2c73f Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 11 Dec 2024 17:21:25 +0000 Subject: [PATCH] change: winlb now has 9 items per page to look not broken --- src/NadekoBot/Modules/Gambling/BetStatsCommands.cs | 4 ++-- src/NadekoBot/Modules/Gambling/UserBetStatsService.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NadekoBot/Modules/Gambling/BetStatsCommands.cs b/src/NadekoBot/Modules/Gambling/BetStatsCommands.cs index 66a1cdf79..9469b3e99 100644 --- a/src/NadekoBot/Modules/Gambling/BetStatsCommands.cs +++ b/src/NadekoBot/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/NadekoBot/Modules/Gambling/UserBetStatsService.cs b/src/NadekoBot/Modules/Gambling/UserBetStatsService.cs index b55e65249..f6c1d2a0a 100644 --- a/src/NadekoBot/Modules/Gambling/UserBetStatsService.cs +++ b/src/NadekoBot/Modules/Gambling/UserBetStatsService.cs @@ -60,8 +60,8 @@ public sealed class UserBetStatsService : INService 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