utility.presence: fix timestamps

This commit is contained in:
Cynthia Foxwell 2022-10-10 13:16:28 -06:00
parent c87d1e1422
commit 147e1d5028

View file

@ -754,6 +754,7 @@ presence.callback = async function (msg, line) {
if (activity.state) descLines.push(activity.state);
}
if (activity.timestamps) {
if (activity.timestamps.start && !activity.timestamps.end) {
descLines.push(
formatTime(Date.now() - activity.timestamps.start) + " elapsed"
@ -782,6 +783,7 @@ presence.callback = async function (msg, line) {
descLines.push(bar);
descLines.push(time);
}
}
embed.description = descLines.join("\n");