fix: don't automatically prompt user to unlink the current account if no arguments are passed

This commit is contained in:
spiral 2021-08-27 22:27:40 -04:00
parent 0553e42eca
commit 7aaa89c65c
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -47,9 +47,7 @@ namespace PluralKit.Bot
await using var conn = await _db.Obtain();
ulong id;
if (!ctx.HasNext())
id = ctx.Author.Id;
else if (!ctx.MatchUserRaw(out id))
if (!ctx.MatchUserRaw(out id))
throw new PKSyntaxError("You must pass an account to link with (either ID or @mention).");
var accountIds = (await _repo.GetSystemAccounts(conn, ctx.System.Id)).ToList();