mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 15:27:54 +00:00
feat: config setting to default show/hide private info
This commit is contained in:
parent
455830a2b5
commit
32bea51e18
14 changed files with 71 additions and 17 deletions
|
|
@ -69,7 +69,7 @@ public class MemberEdit
|
|||
$" To set one, type `pk;member {target.Reference()} description <description>`.";
|
||||
|
||||
if (!target.DescriptionPrivacy.CanAccess(ctx.LookupContextFor(target.System)))
|
||||
throw Errors.LookupNotAllowed;
|
||||
throw target.System == ctx.System?.Id ? Errors.LookupHidden : Errors.LookupNotAllowed;
|
||||
|
||||
if (ctx.MatchRaw())
|
||||
{
|
||||
|
|
@ -125,7 +125,7 @@ public class MemberEdit
|
|||
noPronounsSetMessage += $"To set some, type `pk;member {target.Reference()} pronouns <pronouns>`.";
|
||||
|
||||
if (!target.PronounPrivacy.CanAccess(ctx.LookupContextFor(target.System)))
|
||||
throw Errors.LookupNotAllowed;
|
||||
throw target.System == ctx.System?.Id ? Errors.LookupHidden : Errors.LookupNotAllowed;
|
||||
|
||||
if (ctx.MatchRaw())
|
||||
{
|
||||
|
|
@ -293,7 +293,7 @@ public class MemberEdit
|
|||
else if (!ctx.HasNext())
|
||||
{
|
||||
if (!target.BirthdayPrivacy.CanAccess(ctx.LookupContextFor(target.System)))
|
||||
throw Errors.LookupNotAllowed;
|
||||
throw target.System == ctx.System?.Id ? Errors.LookupHidden : Errors.LookupNotAllowed;
|
||||
|
||||
if (target.Birthday == null)
|
||||
await ctx.Reply("This member does not have a birthdate set."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue