feat: add 'full' argument to pk;s frontpercent command

This commit is contained in:
spiral 2021-11-01 02:35:29 -04:00
parent 235d3c3c86
commit f78d4844e2
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -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);