Added many more braces for multiline if's, Improved .crypto command quite a bit and applied locale-specific format

This commit is contained in:
Kwoth
2022-02-04 06:00:17 +01:00
parent f77f2f433f
commit eda38e64d1
129 changed files with 635 additions and 233 deletions

View File

@@ -67,8 +67,10 @@ public partial class Administration
if (thisPageOverrides.Count == 0)
eb.WithDescription(GetText(strs.perm_override_page_none));
else
{
eb.WithDescription(thisPageOverrides.Select(ov => $"{ov.Command} => {ov.Perm.ToString()}")
.Join("\n"));
}
return eb;
},

View File

@@ -56,6 +56,7 @@ public class DiscordPermOverrideService : INService, ILateBlocker
.FirstOrDefaultAsync(x => x.GuildId == guildId && commandName == x.Command);
if (over is null)
{
uow.Set<DiscordPermOverride>()
.Add(over = new()
{
@@ -63,6 +64,7 @@ public class DiscordPermOverrideService : INService, ILateBlocker
Perm = perm,
GuildId = guildId
});
}
else
over.Perm = perm;