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

@@ -56,7 +56,13 @@ public class DiscordPermOverrideService : INService, ILateBlocker
.FirstOrDefaultAsync(x => x.GuildId == guildId && commandName == x.Command);
if (over is null)
uow.Set<DiscordPermOverride>().Add(over = new() { Command = commandName, Perm = perm, GuildId = guildId });
uow.Set<DiscordPermOverride>()
.Add(over = new()
{
Command = commandName,
Perm = perm,
GuildId = guildId
});
else
over.Perm = perm;
@@ -77,7 +83,8 @@ public class DiscordPermOverrideService : INService, ILateBlocker
uow.RemoveRange(overrides);
await uow.SaveChangesAsync();
foreach (var over in overrides) _overrides.TryRemove((guildId, over.Command), out _);
foreach (var over in overrides)
_overrides.TryRemove((guildId, over.Command), out _);
}
public async Task RemoveOverride(ulong guildId, string commandName)