implement the rest of the config commands

This commit is contained in:
dusk 2025-10-04 19:32:58 +00:00
parent a268f75d32
commit 0f26a69f1b
No known key found for this signature in database
11 changed files with 480 additions and 296 deletions

View file

@ -1,4 +1,5 @@
using Myriad.Extensions;
using Myriad.Types;
using PluralKit.Core;
@ -6,12 +7,10 @@ namespace PluralKit.Bot;
public class SystemLink
{
public async Task LinkSystem(Context ctx)
public async Task LinkSystem(Context ctx, User account)
{
ctx.CheckSystem();
var account = await ctx.MatchUser() ??
throw new PKSyntaxError("You must pass an account to link with (either ID or @mention).");
var accountIds = await ctx.Repository.GetSystemAccounts(ctx.System.Id);
if (accountIds.Contains(account.Id))
throw Errors.AccountAlreadyLinked;