diff --git a/PluralKit.Bot/Commands/System.cs b/PluralKit.Bot/Commands/System.cs index 2fde9b66..4923adac 100644 --- a/PluralKit.Bot/Commands/System.cs +++ b/PluralKit.Bot/Commands/System.cs @@ -25,7 +25,11 @@ namespace PluralKit.Bot { ctx.CheckNoSystem(); - var system = await _data.CreateSystem(ctx.RemainderOrNull()); + var systemName = ctx.RemainderOrNull(); + if (systemName != null && systemName.Length > Limits.MaxSystemNameLength) + throw Errors.SystemNameTooLongError(systemName.Length); + + var system = await _data.CreateSystem(systemName); await _data.AddAccount(system, ctx.Author.Id); await ctx.Reply($"{Emojis.Success} Your system has been created. Type `pk;system` to view it, and type `pk;system help` for more information about commands you can use now. Now that you have that set up, check out the getting started guide on setting up members and proxies: "); }