From f78d4844e2a21a8998029d154cfaccb8cce4912c Mon Sep 17 00:00:00 2001 From: spiral Date: Mon, 1 Nov 2021 02:35:29 -0400 Subject: [PATCH] feat: add 'full' argument to pk;s frontpercent command --- PluralKit.Bot/Commands/SystemFront.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PluralKit.Bot/Commands/SystemFront.cs b/PluralKit.Bot/Commands/SystemFront.cs index b813ced3..d3d777ad 100644 --- a/PluralKit.Bot/Commands/SystemFront.cs +++ b/PluralKit.Bot/Commands/SystemFront.cs @@ -120,6 +120,12 @@ namespace PluralKit.Bot string durationStr = ctx.RemainderOrNull() ?? "30d"; + // Picked the UNIX epoch as a random date + // even though we don't store switch timestamps in UNIX time + // I assume most people won't have switches logged previously to that (?) + if (durationStr == "full") + durationStr = "1970-01-01"; + var now = SystemClock.Instance.GetCurrentInstant(); var rangeStart = DateUtils.ParseDateTime(durationStr, true, system.Zone);