mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 08:40:11 +00:00
refactor: consolidate [x]TooLongErrors into StringTooLongError
This commit is contained in:
parent
b9d090d8cf
commit
bae883c11f
6 changed files with 15 additions and 15 deletions
|
|
@ -194,7 +194,7 @@ namespace PluralKit.Bot
|
|||
{
|
||||
var description = ctx.RemainderOrNull().NormalizeLineEndSpacing();
|
||||
if (description.IsLongerThan(Limits.MaxDescriptionLength))
|
||||
throw Errors.DescriptionTooLongError(description.Length);
|
||||
throw Errors.StringTooLongError("Description", description.Length, Limits.MaxDescriptionLength);
|
||||
|
||||
var patch = new GroupPatch { Description = Partial<string>.Present(description) };
|
||||
await _db.Execute(conn => _repo.UpdateGroup(conn, target.Id, patch));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue