mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 02:08:27 -04:00
Updated editorconfig to (mostly?) require braces around if/else statements, and applied the new formatting rules
This commit is contained in:
@@ -97,7 +97,8 @@ namespace NadekoBot.Modules.Administration
|
||||
var embed = _eb.Create()
|
||||
.WithDescription(GetText(strs.purge_user_confirm(Format.Bold(userId.ToString()))));
|
||||
|
||||
if (!await PromptUserConfirmAsync(embed)) return;
|
||||
if (!await PromptUserConfirmAsync(embed))
|
||||
return;
|
||||
|
||||
await _service.PurgeUserAsync(userId);
|
||||
await ctx.OkAsync();
|
||||
|
@@ -52,7 +52,11 @@ DELETE FROM Clubs;";
|
||||
|
||||
public SelectResult SelectSql(string sql)
|
||||
{
|
||||
var result = new SelectResult { ColumnNames = new(), Results = new() };
|
||||
var result = new SelectResult
|
||||
{
|
||||
ColumnNames = new(),
|
||||
Results = new()
|
||||
};
|
||||
|
||||
using var uow = _db.GetDbContext();
|
||||
var conn = uow.Database.GetDbConnection();
|
||||
@@ -61,7 +65,8 @@ DELETE FROM Clubs;";
|
||||
using var reader = cmd.ExecuteReader();
|
||||
if (reader.HasRows)
|
||||
{
|
||||
for (var i = 0; i < reader.FieldCount; i++) result.ColumnNames.Add(reader.GetName(i));
|
||||
for (var i = 0; i < reader.FieldCount; i++)
|
||||
result.ColumnNames.Add(reader.GetName(i));
|
||||
while (reader.Read())
|
||||
{
|
||||
var obj = new object[reader.FieldCount];
|
||||
@@ -93,13 +98,19 @@ DELETE FROM Clubs;";
|
||||
await uow.Set<WaifuInfo>()
|
||||
.AsQueryable()
|
||||
.Where(x => x.Claimer.UserId == userId)
|
||||
.UpdateAsync(x => new() { ClaimerId = null });
|
||||
.UpdateAsync(x => new()
|
||||
{
|
||||
ClaimerId = null
|
||||
});
|
||||
|
||||
// all affinities set to this waifu are reset
|
||||
await uow.Set<WaifuInfo>()
|
||||
.AsQueryable()
|
||||
.Where(x => x.Affinity.UserId == userId)
|
||||
.UpdateAsync(x => new() { AffinityId = null });
|
||||
.UpdateAsync(x => new()
|
||||
{
|
||||
AffinityId = null
|
||||
});
|
||||
}
|
||||
|
||||
// delete guild xp
|
||||
|
Reference in New Issue
Block a user