diff --git a/PluralKit.API/Controllers/PrivateController.cs b/PluralKit.API/Controllers/PrivateController.cs index 1043e5a4..6e0fc25b 100644 --- a/PluralKit.API/Controllers/PrivateController.cs +++ b/PluralKit.API/Controllers/PrivateController.cs @@ -135,6 +135,9 @@ public class PrivateController: PKControllerBase // guilds.Select(g => new HashEntry(g.Value("id"), true)).ToArray() // ); + if (system.Token == null) + system = await _repo.UpdateSystem(system.Id, new SystemPatch { Token = StringUtils.GenerateToken() }); + var o = new JObject(); o.Add("system", system.ToJson(LookupContext.ByOwner));