implement system link / unlink cmds

This commit is contained in:
dusk 2025-09-28 15:03:28 +00:00
parent 6d6dcc389f
commit 228a177ea3
No known key found for this signature in database
3 changed files with 11 additions and 6 deletions

View file

@ -26,12 +26,12 @@ public class SystemLink
await ctx.Reply($"{Emojis.Success} Account linked to system.");
}
public async Task UnlinkAccount(Context ctx)
public async Task UnlinkAccount(Context ctx, string idRaw)
{
ctx.CheckSystem();
ulong id;
if (!ctx.MatchUserRaw(out id))
if (!idRaw.TryParseMention(out id))
throw new PKSyntaxError("You must pass an account to unlink from (either ID or @mention).");
var accountIds = (await ctx.Repository.GetSystemAccounts(ctx.System.Id)).ToList();