mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat: dynamically show primary command prefix
This commit is contained in:
parent
1d50022d6d
commit
edfc6714d6
30 changed files with 202 additions and 197 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue