Add support for sending stats to Matrix, split out some code into more generic classes. #1
2
index.js
2
index.js
|
@ -123,7 +123,7 @@ async function sendSummary() {
|
|||
await records.toJSONFile(JSON_FILE);
|
||||
|
||||
const yesterday = getYesterday();
|
||||
const makeField = (name, value) => ({ name, value: value.toString(), inline: false });
|
||||
const makeField = (name, value) => ({ name, value: value === undefined ? "***ERR: UNDEFINED***" : value.toString(), inline: false });
|
||||
|
||||
let embed = {
|
||||
title: `Summary from <t:${Math.floor(yesterday.start / 1000)}:f> to <t:${Math.floor(yesterday.end / 1000)}:f>`,
|
||||
|
|
Loading…
Reference in a new issue