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

@@ -30,12 +30,12 @@ public class UserPunishService : INService, IReadyExecutor
_bcs = bcs;
_client = client;
}
public async Task OnReadyAsync()
{
if (_client.ShardId != 0)
return;
var expiryTimer = new PeriodicTimer(TimeSpan.FromHours(12));
do
{
@@ -429,7 +429,11 @@ WHERE GuildId={guildId}
}
else if (template is null)
{
uow.BanTemplates.Add(new() { GuildId = guildId, Text = text });
uow.BanTemplates.Add(new()
{
GuildId = guildId,
Text = text
});
}
else
{
@@ -485,7 +489,8 @@ WHERE GuildId={guildId}
if (string.IsNullOrWhiteSpace(template))
template = JsonConvert.SerializeObject(new
{
color = _bcs.Data.Color.Error.PackedValue >> 8, description = defaultMessage
color = _bcs.Data.Color.Error.PackedValue >> 8,
description = defaultMessage
});
// if template is set to "-" do not dm the user
else if (template == "-")
@@ -495,7 +500,8 @@ WHERE GuildId={guildId}
else if (!SmartText.CreateFrom(template).IsEmbed)
template = JsonConvert.SerializeObject(new
{
color = _bcs.Data.Color.Error.PackedValue >> 8, description = template
color = _bcs.Data.Color.Error.PackedValue >> 8,
description = template
});
var output = SmartText.CreateFrom(template);