Compare commits

...

2 commits

Author SHA1 Message Date
Christopher Cookman 381cdae559 Possibly fix timestamp
Some checks are pending
ptero-push / build (push) Waiting to run
2025-05-08 00:44:46 -06:00
Christopher Cookman 49348b9698 Ok, doing stuff now 2025-05-08 00:44:09 -06:00

View file

@ -363,12 +363,11 @@ const handleDiscord = function (data) {
const product_id = data.data.product_data; const product_id = data.data.product_data;
const fromChannel = data.data.channel.room; const fromChannel = data.data.channel.room;
const body = data.data.body; const body = data.data.body;
console.log(product_id_raw.substring(0, 3))
var evt = events[product_id.pil.substring(0, 3)]; var evt = events[product_id.pil.substring(0, 3)];
evt.code = product_id.pil.substring(0, 3); evt.code = product_id.pil.substring(0, 3);
console.log({product_id_raw, product_id, fromChannel, body, evt}) console.log(`${colors.cyan("[INFO]")} ${product_id.timestamp} ${evt.code} (${evt.priority}) ${body}`);
let embed = { let embed = {
description: `<t:${product_id.timestamp / 1000}:T> <t:${product_id.timestamp / 1000}:R> ${body.string}`, description: `<t:${new Date(product_id.timestamp) / 1000}:T> <t:${new Date(product_id.timestamp) / 1000}:R> ${body.string}`,
color: parseInt(config.priorityColors[evt.priority].replace("#", ""), 16) || 0x000000, color: parseInt(config.priorityColors[evt.priority].replace("#", ""), 16) || 0x000000,
timestamp: product_id.timestamp, timestamp: product_id.timestamp,
footer: { footer: {
@ -413,7 +412,6 @@ const handleDiscord = function (data) {
} }
if (!rows) return; // No channels to alert if (!rows) return; // No channels to alert
rows.forEach(async (row) => { rows.forEach(async (row) => {
console.log(row)
// Get Filters as arrays // Get Filters as arrays
if (!row.filterEvt) row.filterEvt = ""; if (!row.filterEvt) row.filterEvt = "";
if (!row.filter) row.filter = ""; if (!row.filter) row.filter = "";