mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-11-03 16:24:27 -05:00
More convenience methods for the dashy
This commit is contained in:
@@ -751,7 +751,7 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
{
|
||||
await using (var uow = _db.GetDbContext())
|
||||
{
|
||||
cleanRichest = await uow.Set<DiscordUser>().GetTopRichest(_client.CurrentUser.Id, 10_000);
|
||||
cleanRichest = await uow.Set<DiscordUser>().GetTopRichest(_client.CurrentUser.Id, 0, 10_000);
|
||||
}
|
||||
|
||||
await ctx.Channel.TriggerTypingAsync();
|
||||
@@ -763,7 +763,7 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
else
|
||||
{
|
||||
await using var uow = _db.GetDbContext();
|
||||
cleanRichest = await uow.Set<DiscordUser>().GetTopRichest(_client.CurrentUser.Id, 9, page);
|
||||
cleanRichest = await uow.Set<DiscordUser>().GetTopRichest(_client.CurrentUser.Id, page);
|
||||
}
|
||||
|
||||
await ctx.SendPaginatedConfirmAsync(page,
|
||||
@@ -775,7 +775,7 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
if (!opts.Clean)
|
||||
{
|
||||
await using var uow = _db.GetDbContext();
|
||||
toSend = await uow.Set<DiscordUser>().GetTopRichest(_client.CurrentUser.Id, 9, curPage);
|
||||
toSend = await uow.Set<DiscordUser>().GetTopRichest(_client.CurrentUser.Id, curPage);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -288,10 +288,10 @@ public class WaifuService : INService, IReadyExecutor
|
||||
return (oldAff, success, remaining);
|
||||
}
|
||||
|
||||
public IEnumerable<WaifuLbResult> GetTopWaifusAtPage(int page)
|
||||
public IEnumerable<WaifuLbResult> GetTopWaifusAtPage(int page, int perPage = 9)
|
||||
{
|
||||
using var uow = _db.GetDbContext();
|
||||
return uow.Set<WaifuInfo>().GetTop(9, page * 9);
|
||||
return uow.Set<WaifuInfo>().GetTop(perPage, page * perPage);
|
||||
}
|
||||
|
||||
public ulong GetWaifuUserId(ulong ownerId, string name)
|
||||
|
||||
Reference in New Issue
Block a user