mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat: implement system privacy commands (yay system edit done)
This commit is contained in:
parent
cb0a9eaf9f
commit
3eece261fd
10 changed files with 154 additions and 75 deletions
|
|
@ -36,7 +36,15 @@ public static class ContextParametersExt
|
|||
);
|
||||
}
|
||||
|
||||
public static async Task<string?> ParamResolvePrivacyLevel(this Context ctx, string param_name)
|
||||
public static async Task<SystemPrivacySubject?> ParamResolveSystemPrivacyTarget(this Context ctx, string param_name)
|
||||
{
|
||||
return await ctx.Parameters.ResolveParameter(
|
||||
ctx, param_name,
|
||||
param => (param as Parameter.SystemPrivacyTarget)?.target
|
||||
);
|
||||
}
|
||||
|
||||
public static async Task<PrivacyLevel?> ParamResolvePrivacyLevel(this Context ctx, string param_name)
|
||||
{
|
||||
return await ctx.Parameters.ResolveParameter(
|
||||
ctx, param_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue