change: improved .xplb -c, it will now correctly work only on users who are still in the server, isntead of only top 1k

fix: Fixed medusa error on bot startup
This commit is contained in:
Kwoth
2024-10-03 12:58:45 +00:00
parent de8d4b7d9e
commit 0cf7909fef
4 changed files with 32 additions and 33 deletions

View File

@@ -26,17 +26,6 @@ public static class UserXpExtensions
return usr;
}
public static async Task<IReadOnlyCollection<UserXpStats>> GetUsersFor(
this DbSet<UserXpStats> xps,
ulong guildId,
int page)
=> await xps.ToLinqToDBTable()
.Where(x => x.GuildId == guildId)
.OrderByDescending(x => x.Xp + x.AwardedXp)
.Skip(page * 9)
.Take(9)
.ToArrayAsyncLinqToDB();
public static async Task<List<UserXpStats>> GetTopUserXps(this DbSet<UserXpStats> xps, ulong guildId, int count)
=> await xps.ToLinqToDBTable()
.Where(x => x.GuildId == guildId)