mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 10:10:12 +00:00
feat: add 'full' argument to pk;s frontpercent command
This commit is contained in:
parent
235d3c3c86
commit
f78d4844e2
1 changed files with 6 additions and 0 deletions
|
|
@ -120,6 +120,12 @@ namespace PluralKit.Bot
|
||||||
|
|
||||||
string durationStr = ctx.RemainderOrNull() ?? "30d";
|
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 now = SystemClock.Instance.GetCurrentInstant();
|
||||||
|
|
||||||
var rangeStart = DateUtils.ParseDateTime(durationStr, true, system.Zone);
|
var rangeStart = DateUtils.ParseDateTime(durationStr, true, system.Zone);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue