From 5bc31cbf3e34de787901da04f0d19023fb8da8c0 Mon Sep 17 00:00:00 2001 From: acw0 Date: Wed, 5 Aug 2020 19:56:40 -0400 Subject: [PATCH] Fix error message --- PluralKit.Bot/Commands/Lists/MemberListOptions.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PluralKit.Bot/Commands/Lists/MemberListOptions.cs b/PluralKit.Bot/Commands/Lists/MemberListOptions.cs index 2f6a7aad..6e760aed 100644 --- a/PluralKit.Bot/Commands/Lists/MemberListOptions.cs +++ b/PluralKit.Bot/Commands/Lists/MemberListOptions.cs @@ -28,7 +28,8 @@ namespace PluralKit.Bot public string CreateFilterString() { var str = new StringBuilder(); - str.Append("Sorting by "); + str.Append("Sorting "); + if (SortProperty != SortProperty.Random) str.Append("by "); str.Append(SortProperty switch { SortProperty.Name => "member name", @@ -39,6 +40,7 @@ namespace PluralKit.Bot SortProperty.LastSwitch => "last switch", SortProperty.MessageCount => "message count", SortProperty.Birthdate => "birthday", + SortProperty.Random => "randomly", _ => new ArgumentOutOfRangeException($"Couldn't find readable string for sort property {SortProperty}") });