mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 08:40:11 +00:00
fix: show correct name in entityReference when base name is private
This commit is contained in:
parent
47e501da81
commit
375758206e
8 changed files with 72 additions and 68 deletions
|
|
@ -64,7 +64,7 @@ public class MemberProxy
|
|||
throw new PKSyntaxError("You must pass an example proxy to add (eg. `[text]` or `J:text`).");
|
||||
|
||||
var tagToAdd = ParseProxyTags(ctx.RemainderOrNull(false));
|
||||
if (tagToAdd.IsEmpty) throw Errors.EmptyProxyTags(target);
|
||||
if (tagToAdd.IsEmpty) throw Errors.EmptyProxyTags(target, ctx);
|
||||
if (target.ProxyTags.Contains(tagToAdd))
|
||||
throw Errors.ProxyTagAlreadyExists(tagToAdd, target);
|
||||
if (tagToAdd.ProxyString.Length > Limits.MaxProxyTagLength)
|
||||
|
|
@ -88,7 +88,7 @@ public class MemberProxy
|
|||
throw new PKSyntaxError("You must pass a proxy tag to remove (eg. `[text]` or `J:text`).");
|
||||
|
||||
var tagToRemove = ParseProxyTags(ctx.RemainderOrNull(false));
|
||||
if (tagToRemove.IsEmpty) throw Errors.EmptyProxyTags(target);
|
||||
if (tagToRemove.IsEmpty) throw Errors.EmptyProxyTags(target, ctx);
|
||||
if (!target.ProxyTags.Contains(tagToRemove))
|
||||
throw Errors.ProxyTagDoesNotExist(tagToRemove, target);
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ public class MemberProxy
|
|||
else
|
||||
{
|
||||
var requestedTag = ParseProxyTags(ctx.RemainderOrNull(false));
|
||||
if (requestedTag.IsEmpty) throw Errors.EmptyProxyTags(target);
|
||||
if (requestedTag.IsEmpty) throw Errors.EmptyProxyTags(target, ctx);
|
||||
|
||||
// This is mostly a legacy command, so it's gonna warn if there's
|
||||
// already more than one proxy tag.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue