mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 07:47:53 +00:00
implement system link / unlink cmds
This commit is contained in:
parent
6d6dcc389f
commit
228a177ea3
3 changed files with 11 additions and 6 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue