mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 00:30:11 +00:00
fix(bot): fix a few NPEs
This commit is contained in:
parent
e88486cb41
commit
d997f725e2
4 changed files with 5 additions and 3 deletions
|
|
@ -112,6 +112,8 @@ public class Switch
|
|||
|
||||
await using var conn = await ctx.Database.Obtain();
|
||||
var currentSwitch = await ctx.Repository.GetLatestSwitch(ctx.System.Id);
|
||||
if (currentSwitch == null)
|
||||
throw Errors.NoRegisteredSwitches;
|
||||
var currentSwitchMembers = await ctx.Repository.GetSwitchMembers(conn, currentSwitch.Id).ToListAsync().AsTask();
|
||||
|
||||
if (ctx.MatchFlag("first", "f"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue