Finally retire the PKMember setters!

This commit is contained in:
Ske
2020-06-29 14:15:30 +02:00
parent 281b669391
commit c5697b33e2
9 changed files with 94 additions and 86 deletions

View File

@@ -100,10 +100,10 @@ namespace PluralKit.Bot
var description = ctx.RemainderOrNull().NormalizeLineEndSpacing();
if (description.IsLongerThan(Limits.MaxDescriptionLength))
throw Errors.DescriptionTooLongError(description.Length);
target.Description = description;
var patch = new MemberPatch {Description = Partial<string>.Present(description)};
await _db.Execute(conn => conn.UpdateMember(target.Id, patch));
await ctx.Reply($"{Emojis.Success} Member description changed.");
}
}

View File

@@ -56,8 +56,6 @@ namespace PluralKit.Bot
throw Errors.GenericCancelled();
}
target.ProxyTags = new ProxyTag[] { };
var patch = new MemberPatch {ProxyTags = Partial<ProxyTag[]>.Present(new ProxyTag[0])};
await _db.Execute(conn => conn.UpdateMember(target.Id, patch));