mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Updated editorconfig to (mostly?) require braces around if/else statements, and applied the new formatting rules
This commit is contained in:
@@ -337,7 +337,8 @@ public partial class Xp
|
||||
var embed = _eb.Create().WithTitle(GetText(strs.club_leaderboard(page + 1))).WithOkColor();
|
||||
|
||||
var i = page * 9;
|
||||
foreach (var club in clubs) embed.AddField($"#{++i} " + club, club.Xp + " xp");
|
||||
foreach (var club in clubs)
|
||||
embed.AddField($"#{++i} " + club, club.Xp + " xp");
|
||||
|
||||
return ctx.Channel.EmbedAsync(embed);
|
||||
}
|
||||
|
@@ -28,7 +28,12 @@ public class ClubService : INService
|
||||
if (xp.Level >= 5 && du.Club is null)
|
||||
{
|
||||
du.IsClubAdmin = true;
|
||||
du.Club = new() { Name = clubName, Discrim = uow.Clubs.GetNextDiscrim(clubName), Owner = du };
|
||||
du.Club = new()
|
||||
{
|
||||
Name = clubName,
|
||||
Discrim = uow.Clubs.GetNextDiscrim(clubName),
|
||||
Owner = du
|
||||
};
|
||||
uow.Clubs.Add(du.Club);
|
||||
uow.SaveChanges();
|
||||
}
|
||||
@@ -142,7 +147,11 @@ public class ClubService : INService
|
||||
// or doesn't min minumum level requirement, can't apply
|
||||
return false;
|
||||
|
||||
var app = new ClubApplicants { ClubId = club.Id, UserId = du.Id };
|
||||
var app = new ClubApplicants
|
||||
{
|
||||
ClubId = club.Id,
|
||||
UserId = du.Id
|
||||
};
|
||||
|
||||
uow.Set<ClubApplicants>().Add(app);
|
||||
|
||||
@@ -254,7 +263,11 @@ public class ClubService : INService
|
||||
|| (usr.IsClubAdmin && club.Owner.UserId != bannerId)) // can't ban the owner kek, whew
|
||||
return false;
|
||||
|
||||
club.Bans.Add(new() { Club = club, User = usr });
|
||||
club.Bans.Add(new()
|
||||
{
|
||||
Club = club,
|
||||
User = usr
|
||||
});
|
||||
club.Users.Remove(usr);
|
||||
|
||||
var app = club.Applicants.FirstOrDefault(x => x.UserId == usr.Id);
|
||||
|
Reference in New Issue
Block a user