Fixed owners not being able to ban/kick users from clubs.
This commit is contained in:
parent
1102d08188
commit
8b6bf2f269
@ -32,6 +32,7 @@ namespace NadekoBot.Services.Database.Repositories.Impl
|
|||||||
.Include(x => x.Applicants)
|
.Include(x => x.Applicants)
|
||||||
.ThenInclude(x => x.User)
|
.ThenInclude(x => x.User)
|
||||||
.Include(x => x.Owner)
|
.Include(x => x.Owner)
|
||||||
|
.Include(x => x.Users)
|
||||||
.FirstOrDefault(x => x.Owner.UserId == userId) ??
|
.FirstOrDefault(x => x.Owner.UserId == userId) ??
|
||||||
_context.Set<DiscordUser>()
|
_context.Set<DiscordUser>()
|
||||||
.Include(x => x.Club)
|
.Include(x => x.Club)
|
||||||
|
@ -42,12 +42,12 @@ namespace NadekoBot.Services.Database.Repositories.Impl
|
|||||||
{
|
{
|
||||||
if (!_set.Where(y => y.UserId == id).Any())
|
if (!_set.Where(y => y.UserId == id).Any())
|
||||||
{
|
{
|
||||||
return _set.Count();
|
return _set.Count() + 1;
|
||||||
}
|
}
|
||||||
return _set.Count(x => x.TotalXp >=
|
return _set.Count(x => x.TotalXp >=
|
||||||
_set.Where(y => y.UserId == id)
|
_set.Where(y => y.UserId == id)
|
||||||
.DefaultIfEmpty()
|
.DefaultIfEmpty()
|
||||||
.Sum(y => y.TotalXp)) + 1;
|
.Sum(y => y.TotalXp));
|
||||||
}
|
}
|
||||||
|
|
||||||
public DiscordUser[] GetUsersXpLeaderboardFor(int page)
|
public DiscordUser[] GetUsersXpLeaderboardFor(int page)
|
||||||
|
Loading…
Reference in New Issue
Block a user