Various additional tweaks/additions to groups
This commit is contained in:
@@ -6,6 +6,7 @@ namespace PluralKit.Core
|
||||
{
|
||||
Description,
|
||||
Icon,
|
||||
List,
|
||||
Visibility
|
||||
}
|
||||
|
||||
@@ -18,6 +19,7 @@ namespace PluralKit.Core
|
||||
{
|
||||
GroupPrivacySubject.Description => group.DescriptionPrivacy = level,
|
||||
GroupPrivacySubject.Icon => group.IconPrivacy = level,
|
||||
GroupPrivacySubject.List => group.ListPrivacy = level,
|
||||
GroupPrivacySubject.Visibility => group.Visibility = level,
|
||||
_ => throw new ArgumentOutOfRangeException($"Unknown privacy subject {subject}")
|
||||
};
|
||||
@@ -52,9 +54,13 @@ namespace PluralKit.Core
|
||||
case "hidden":
|
||||
case "shown":
|
||||
case "visible":
|
||||
case "list":
|
||||
subject = GroupPrivacySubject.Visibility;
|
||||
break;
|
||||
case "list":
|
||||
case "listing":
|
||||
case "members":
|
||||
subject = GroupPrivacySubject.List;
|
||||
break;
|
||||
default:
|
||||
subject = default;
|
||||
return false;
|
||||
|
@@ -16,8 +16,8 @@ namespace PluralKit.Core
|
||||
public static string Explanation(this PrivacyLevel level) =>
|
||||
level switch
|
||||
{
|
||||
PrivacyLevel.Private => "**Private** (visible only when queried by you)",
|
||||
PrivacyLevel.Public => "**Public** (visible to everyone)",
|
||||
PrivacyLevel.Private => "Private *(visible only when queried by you)*",
|
||||
PrivacyLevel.Public => "Public *(visible to everyone)*",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(level), level, null)
|
||||
};
|
||||
|
||||
|
@@ -6,6 +6,7 @@ namespace PluralKit.Core
|
||||
{
|
||||
Description,
|
||||
MemberList,
|
||||
GroupList,
|
||||
Front,
|
||||
FrontHistory
|
||||
}
|
||||
@@ -21,6 +22,7 @@ namespace PluralKit.Core
|
||||
SystemPrivacySubject.Front => system.FrontPrivacy = level,
|
||||
SystemPrivacySubject.FrontHistory => system.FrontHistoryPrivacy = level,
|
||||
SystemPrivacySubject.MemberList => system.MemberListPrivacy = level,
|
||||
SystemPrivacySubject.GroupList => system.GroupListPrivacy = level,
|
||||
_ => throw new ArgumentOutOfRangeException($"Unknown privacy subject {subject}")
|
||||
};
|
||||
|
||||
@@ -61,6 +63,10 @@ namespace PluralKit.Core
|
||||
case "fh":
|
||||
subject = SystemPrivacySubject.FrontHistory;
|
||||
break;
|
||||
case "groups":
|
||||
case "gs":
|
||||
subject = SystemPrivacySubject.GroupList;
|
||||
break;
|
||||
default:
|
||||
subject = default;
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user