From 476a69631745a5d6186caf624dd6846c7d1cb63e Mon Sep 17 00:00:00 2001 From: joseph le Date: Fri, 17 Nov 2023 07:40:53 +0700 Subject: [PATCH] update function power --- app/utils/powerSchedule.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/utils/powerSchedule.js b/app/utils/powerSchedule.js index df5ce71..e0ad3b1 100644 --- a/app/utils/powerSchedule.js +++ b/app/utils/powerSchedule.js @@ -45,8 +45,6 @@ const { addLogFunction } = require("./addLogFunctionJS"); return data.map((u) => u.join("\n\n")); }); - console.log("Table data:", tableData); - await browser.close(); let params = { type: "stream", @@ -56,10 +54,12 @@ const { addLogFunction } = require("./addLogFunctionJS"); ":warning: :date: :warning:\n\n" + tableData.join("\n\n") + "\n-------", }; client.messages.send(params); + let checkTime = moment(Date.now()).format("DD_MM_YYYY").toString() if ( - tableData.filter((i) => i.includes("KDC 91B") || i.includes("KDC91B")) + tableData.filter((i) => (i.includes("KDC 91B") || i.includes("KDC91B")) && i.includes(checkTime)) .length > 0 ) { + let params = { type: "stream", to: "APAC Tech Bão",