diff --git a/PluralKit.Bot/Commands/Lists/ContextListExt.cs b/PluralKit.Bot/Commands/Lists/ContextListExt.cs index d0891787..57096c44 100644 --- a/PluralKit.Bot/Commands/Lists/ContextListExt.cs +++ b/PluralKit.Bot/Commands/Lists/ContextListExt.cs @@ -75,6 +75,8 @@ public static class ContextListExt p.IncludePronouns = true; if (ctx.MatchFlag("with-displayname", "wdn")) p.IncludeDisplayName = true; + if (ctx.MatchFlag("with-birthday", "wbd", "wb")) + p.IncludeBirthday = true; // Always show the sort property, too (unless this is the short list) if (p.Type != ListType.Short) @@ -84,6 +86,7 @@ public static class ContextListExt if (p.SortProperty == SortProperty.CreationDate) p.IncludeCreated = true; if (p.SortProperty == SortProperty.LastSwitch) p.IncludeLastSwitch = true; if (p.SortProperty == SortProperty.LastMessage) p.IncludeLastMessage = true; + if (p.SortProperty == SortProperty.Birthdate) p.IncludeBirthday = true; } // Make sure the options are valid @@ -197,6 +200,10 @@ public static class ContextListExt { ret += $"({pronouns})"; } + else if (opts.IncludeBirthday && m.BirthdayFor(lookupCtx) is {} birthday) + { + ret += $"(birthday: {m.BirthdayString})"; + } else if (m.HasProxyTags) { var proxyTagsString = m.ProxyTagsString(); diff --git a/PluralKit.Bot/Commands/Lists/ListOptions.cs b/PluralKit.Bot/Commands/Lists/ListOptions.cs index ce5e2fd7..3a6937d3 100644 --- a/PluralKit.Bot/Commands/Lists/ListOptions.cs +++ b/PluralKit.Bot/Commands/Lists/ListOptions.cs @@ -40,6 +40,7 @@ public class ListOptions public bool IncludeAvatar { get; set; } public bool IncludePronouns { get; set; } public bool IncludeDisplayName { get; set; } + public bool IncludeBirthday { get; set; } public string CreateFilterString() { @@ -174,6 +175,7 @@ public static class ListOptionsExt opts.IncludeAvatar, opts.IncludePronouns, opts.IncludeDisplayName, + opts.IncludeBirthday, }.Sum(x => Convert.ToInt32(x)) > 1; if (hasMultipleIncluded)