mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 07:17:56 +00:00
fix: check if system exists in HandleSystemCommandsTargeted
This commit is contained in:
parent
af3702152f
commit
efaf814e12
2 changed files with 38 additions and 24 deletions
|
|
@ -55,6 +55,13 @@ public static class ContextChecksExt
|
|||
return ctx;
|
||||
}
|
||||
|
||||
public static Context CheckSystem(this Context ctx, PKSystem system)
|
||||
{
|
||||
if (system == null)
|
||||
throw Errors.NoSystemError;
|
||||
return ctx;
|
||||
}
|
||||
|
||||
public static Context CheckNoSystem(this Context ctx)
|
||||
{
|
||||
if (ctx.System != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue