implement random commands, dont keep the subcommands only the flags

This commit is contained in:
dusk 2025-09-26 23:56:49 +00:00
parent c00ff2f371
commit c92c3f84f0
No known key found for this signature in database
13 changed files with 82 additions and 24 deletions

View file

@ -10,6 +10,7 @@ public abstract record Parameter()
{
public record MemberRef(PKMember member): Parameter;
public record MemberRefs(List<PKMember> members): Parameter;
public record GroupRef(PKGroup group): Parameter;
public record SystemRef(PKSystem system): Parameter;
public record GuildRef(Guild guild): Parameter;
public record MemberPrivacyTarget(MemberPrivacySubject target): Parameter;
@ -73,6 +74,11 @@ public class Parameters
?? throw new PKError(ctx.CreateNotFoundError("Member", m, byId))
).ToListAsync()
);
case uniffi.commands.Parameter.GroupRef groupRef:
return new Parameter.GroupRef(
await ctx.ParseGroup(groupRef.group, byId)
?? throw new PKError(ctx.CreateNotFoundError("Group", groupRef.group))
);
case uniffi.commands.Parameter.SystemRef systemRef:
// todo: do we need byId here?
return new Parameter.SystemRef(