feat(bot): add system guild icon & guild name (#554)

This commit is contained in:
rladenson 2023-07-19 12:48:04 +12:00 committed by Iris System
parent d12cd481f6
commit 3045c5e307
22 changed files with 337 additions and 28 deletions

View file

@ -2,6 +2,8 @@ namespace PluralKit.Core;
public enum SystemPrivacySubject
{
Name,
Avatar,
Description,
Pronouns,
MemberList,
@ -17,6 +19,8 @@ public static class SystemPrivacyUtils
// what do you mean switch expressions can't be statements >.>
_ = subject switch
{
SystemPrivacySubject.Name => system.NamePrivacy = level,
SystemPrivacySubject.Avatar => system.AvatarPrivacy = level,
SystemPrivacySubject.Description => system.DescriptionPrivacy = level,
SystemPrivacySubject.Pronouns => system.PronounPrivacy = level,
SystemPrivacySubject.Front => system.FrontPrivacy = level,
@ -40,6 +44,15 @@ public static class SystemPrivacyUtils
{
switch (input.ToLowerInvariant())
{
case "name":
subject = SystemPrivacySubject.Name;
break;
case "avatar":
case "pfp":
case "pic":
case "icon":
subject = SystemPrivacySubject.Avatar;
break;
case "description":
case "desc":
case "text":