diff --git a/PluralKit.Bot/Commands/MemberEdit.cs b/PluralKit.Bot/Commands/MemberEdit.cs index 180ab31a..74157419 100644 --- a/PluralKit.Bot/Commands/MemberEdit.cs +++ b/PluralKit.Bot/Commands/MemberEdit.cs @@ -423,6 +423,9 @@ public class MemberEdit { var newDisplayName = ctx.RemainderOrNull(false).NormalizeLineEndSpacing(); + if (newDisplayName.Length > Limits.MaxMemberNameLength) + throw Errors.StringTooLongError("Member display name", newDisplayName.Length, Limits.MaxMemberNameLength); + var patch = new MemberPatch { DisplayName = Partial.Present(newDisplayName) }; await ctx.Repository.UpdateMember(target.Id, patch);