implement rest of group and member commands

This commit is contained in:
dusk 2025-10-01 00:51:45 +00:00
parent 95fc7e9f60
commit 1943687c70
No known key found for this signature in database
13 changed files with 705 additions and 443 deletions

View file

@ -127,16 +127,6 @@ public static class ContextArgumentsExt
ctx.PopArgument();
return (messageId, channelId);
}
public static async Task<List<PKMember>> ParseMemberList(this Context ctx, SystemId? restrictToSystem)
{
throw new NotImplementedException();
}
public static async Task<List<PKGroup>> ParseGroupList(this Context ctx, SystemId? restrictToSystem)
{
throw new NotImplementedException();
}
}
public enum ReplyFormat

View file

@ -36,6 +36,14 @@ public static class ContextParametersExt
);
}
public static async Task<List<PKGroup>> ParamResolveGroups(this Context ctx, string param_name)
{
return await ctx.Parameters.ResolveParameter(
ctx, param_name,
param => (param as Parameter.GroupRefs)?.groups
);
}
public static async Task<PKSystem?> ParamResolveSystem(this Context ctx, string param_name)
{
return await ctx.Parameters.ResolveParameter(
@ -52,6 +60,14 @@ public static class ContextParametersExt
);
}
public static async Task<GroupPrivacySubject?> ParamResolveGroupPrivacyTarget(this Context ctx, string param_name)
{
return await ctx.Parameters.ResolveParameter(
ctx, param_name,
param => (param as Parameter.GroupPrivacyTarget)?.target
);
}
public static async Task<SystemPrivacySubject?> ParamResolveSystemPrivacyTarget(this Context ctx, string param_name)
{
return await ctx.Parameters.ResolveParameter(