mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Throw syntax error when no argument is given to member rename
This commit is contained in:
parent
f610f88351
commit
9ad16a98ed
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ namespace PluralKit.Bot.Commands
|
|||
if (ctx.System == null) throw Errors.NoSystemError;
|
||||
if (target.System != ctx.System.Id) throw Errors.NotOwnMemberError;
|
||||
|
||||
var newName = ctx.RemainderOrNull();
|
||||
var newName = ctx.RemainderOrNull() ?? throw new PKSyntaxError("You must pass a new name for the member.");
|
||||
|
||||
// Hard name length cap
|
||||
if (newName.Length > Limits.MaxMemberNameLength) throw Errors.MemberNameTooLongError(newName.Length);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue