From 04ea199cfb5be95d6a8ffb2fb080ac0893b3383a Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Fri, 23 Dec 2022 15:27:02 +1100 Subject: [PATCH] send notification upon dailyMsgs update --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 43b337e..93b01b2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -163,6 +163,7 @@ setInterval(async()=>{ } dailyMsgs.push([formattedDate, total]); fs.writeFileSync(__dirname + '/database/dailyMsgs.json', JSON.stringify(dailyMsgs)) - console.log(`[${client.moment().format('DD/MM/YY HH:mm:ss')}]`, `Pushed [${formattedDate}, ${total}] to dailyMsgs`) + console.log(`[${client.moment().format('DD/MM/YY HH:mm:ss')}]`, `Pushed [${formattedDate}, ${total}] to dailyMsgs`); + (client.channels.resolve(client.config.mainServer.channels.logs) as Discord.TextChannel).send(`:pencil: Pushed \`[${formattedDate}, ${total}]\` to `) } }, 5000)