feat: dynamically show primary command prefix

This commit is contained in:
rladenson 2024-12-31 08:09:18 -07:00 committed by Petal Ladenson
parent 1d50022d6d
commit edfc6714d6
30 changed files with 202 additions and 197 deletions

View file

@ -51,21 +51,21 @@ public static class ContextChecksExt
public static Context CheckSystem(this Context ctx)
{
if (ctx.System == null)
throw Errors.NoSystemError;
throw Errors.NoSystemError(ctx.DefaultPrefix);
return ctx;
}
public static Context CheckSystem(this Context ctx, PKSystem system)
{
if (system == null)
throw Errors.NoSystemError;
throw Errors.NoSystemError(ctx.DefaultPrefix);
return ctx;
}
public static Context CheckNoSystem(this Context ctx)
{
if (ctx.System != null)
throw Errors.ExistingSystemError;
throw Errors.ExistingSystemError(ctx.DefaultPrefix);
return ctx;
}