mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
change: Leaderboards will show 10 users per page
This commit is contained in:
@@ -107,7 +107,7 @@ public partial class Xp : NadekoModule<XpService>
|
||||
[Cmd]
|
||||
[UserPerm(GuildPerm.ManageChannels)]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task XpExclude(Channel _, [Leftover] IChannel channel = null)
|
||||
public async Task XpExclude(Channel _, [Leftover] IChannel? channel = null)
|
||||
{
|
||||
if (channel is null)
|
||||
channel = ctx.Channel;
|
||||
@@ -203,7 +203,7 @@ public partial class Xp : NadekoModule<XpService>
|
||||
await Response()
|
||||
.Paginated()
|
||||
.PageItems(GetPageItems)
|
||||
.PageSize(9)
|
||||
.PageSize(10)
|
||||
.CurrentPage(page)
|
||||
.Page((users, curPage) =>
|
||||
{
|
||||
@@ -262,7 +262,7 @@ public partial class Xp : NadekoModule<XpService>
|
||||
await Response()
|
||||
.Paginated()
|
||||
.PageItems(GetPageItems)
|
||||
.PageSize(9)
|
||||
.PageSize(10)
|
||||
.Page((users, curPage) =>
|
||||
{
|
||||
var embed = _sender.CreateEmbed()
|
||||
|
@@ -571,8 +571,8 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
|
||||
.UserXpStats
|
||||
.Where(x => x.GuildId == guildId)
|
||||
.OrderByDescending(x => x.Xp + x.AwardedXp)
|
||||
.Skip(page * 9)
|
||||
.Take(9)
|
||||
.Skip(page * 10)
|
||||
.Take(10)
|
||||
.ToArrayAsyncLinqToDB();
|
||||
}
|
||||
|
||||
@@ -582,8 +582,8 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
|
||||
return await uow.Set<UserXpStats>()
|
||||
.Where(x => x.GuildId == guildId && x.UserId.In(users))
|
||||
.OrderByDescending(x => x.Xp + x.AwardedXp)
|
||||
.Skip(page * 9)
|
||||
.Take(9)
|
||||
.Skip(page * 10)
|
||||
.Take(10)
|
||||
.ToArrayAsyncLinqToDB();
|
||||
}
|
||||
|
||||
@@ -593,8 +593,8 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
|
||||
|
||||
return await uow.GetTable<DiscordUser>()
|
||||
.OrderByDescending(x => x.TotalXp)
|
||||
.Skip(page * 9)
|
||||
.Take(9)
|
||||
.Skip(page * 10)
|
||||
.Take(10)
|
||||
.ToArrayAsyncLinqToDB();
|
||||
}
|
||||
|
||||
@@ -605,8 +605,8 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
|
||||
return await uow.GetTable<DiscordUser>()
|
||||
.Where(x => x.UserId.In(users))
|
||||
.OrderByDescending(x => x.TotalXp)
|
||||
.Skip(page * 9)
|
||||
.Take(9)
|
||||
.Skip(page * 10)
|
||||
.Take(10)
|
||||
.ToArrayAsyncLinqToDB();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user