Updated editorconfig to (mostly?) require braces around if/else statements, and applied the new formatting rules

This commit is contained in:
Kwoth
2022-02-02 01:44:45 +01:00
parent b22cd5a81e
commit ffa2c3f119
202 changed files with 2108 additions and 920 deletions

View File

@@ -34,8 +34,8 @@ public partial class Permissions
BlacklistType.User => Format.Code(i.ItemId.ToString())
+ " "
+ ((await _client.Rest.GetUserAsync(i.ItemId))
?.ToString()
?? ""),
?.ToString()
?? ""),
BlacklistType.Server => Format.Code(i.ItemId.ToString())
+ " "
+ (_client.GetGuild(i.ItemId)?.ToString() ?? ""),

View File

@@ -75,7 +75,8 @@ public sealed class BlacklistService : IEarlyBehavior
using var uow = _db.GetDbContext();
var toPublish = uow.Blacklist.AsNoTracking().ToArray();
blacklist = toPublish;
if (publish) _pubSub.Pub(_blPubKey, toPublish);
if (publish)
_pubSub.Pub(_blPubKey, toPublish);
}
public void Blacklist(BlacklistType type, ulong id)
@@ -84,7 +85,11 @@ public sealed class BlacklistService : IEarlyBehavior
return;
using var uow = _db.GetDbContext();
var item = new BlacklistEntry { ItemId = id, Type = type };
var item = new BlacklistEntry
{
ItemId = id,
Type = type
};
uow.Blacklist.Add(item);
uow.SaveChanges();
@@ -110,7 +115,11 @@ public sealed class BlacklistService : IEarlyBehavior
{
var bc = uow.Blacklist;
//blacklist the users
bc.AddRange(toBlacklist.Select(x => new BlacklistEntry { ItemId = x, Type = BlacklistType.User }));
bc.AddRange(toBlacklist.Select(x => new BlacklistEntry
{
ItemId = x,
Type = BlacklistType.User
}));
//clear their currencies
uow.DiscordUser.RemoveFromMany(toBlacklist);