mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 15:27:54 +00:00
fix: add missing parameters ext method, fix SwitchDelete usage
This commit is contained in:
parent
10dd499835
commit
4e0c56f6cb
4 changed files with 11 additions and 2 deletions
|
|
@ -20,6 +20,14 @@ public static class ContextParametersExt
|
|||
);
|
||||
}
|
||||
|
||||
public static async Task<List<PKMember>> ParamResolveMembers(this Context ctx, string param_name)
|
||||
{
|
||||
return await ctx.Parameters.ResolveParameter(
|
||||
ctx, param_name,
|
||||
param => (param as Parameter.MemberRefs)?.members
|
||||
);
|
||||
}
|
||||
|
||||
public static async Task<PKSystem?> ParamResolveSystem(this Context ctx, string param_name)
|
||||
{
|
||||
return await ctx.Parameters.ResolveParameter(
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class SystemFront
|
|||
{
|
||||
if (ctx.MatchFlag("clear", "c") || ctx.PeekArgument() == "clear")
|
||||
{
|
||||
await new Switch().SwitchDelete(ctx);
|
||||
await new Switch().SwitchDelete(ctx, true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue