From 84417b9adfb493f3e06d3ede5b031c371da0892b Mon Sep 17 00:00:00 2001 From: ambdroid Date: Sun, 24 Mar 2024 19:07:34 -0400 Subject: [PATCH] don't assert twice --- PluralKit.Bot/Commands/Lists/ContextListExt.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/PluralKit.Bot/Commands/Lists/ContextListExt.cs b/PluralKit.Bot/Commands/Lists/ContextListExt.cs index 202aa72e..3ddade72 100644 --- a/PluralKit.Bot/Commands/Lists/ContextListExt.cs +++ b/PluralKit.Bot/Commands/Lists/ContextListExt.cs @@ -69,10 +69,6 @@ public static class ContextListExt if (p.SortProperty == SortProperty.CreationDate) p.IncludeCreated = true; } - // Make sure the options are valid - p.AssertIsValid(); - - // Done! return p; } @@ -117,7 +113,13 @@ public static class ContextListExt public static ListOptions ParseListOptionsGroup(this Context ctx, LookupContext lookupCtx) { - return ctx.ParseListOptions(lookupCtx); + var p = ctx.ParseListOptions(lookupCtx); + + // Make sure the options are valid + p.AssertIsValid(); + + // Done! + return p; } public static async Task RenderMemberList(this Context ctx, LookupContext lookupCtx,